Merge branch 'master' into django2
[mygpo.git] / mygpo / users / urls.py
bloba0de737d1814ee3cc470d9f85f5fcc56886ad7ee
1 from django.urls import path, register_converter
2 from django.contrib.auth.views import LogoutView
3 from django.views.generic.base import TemplateView
5 from .views import registration, settings, device, user
6 from mygpo.users import converters
8 register_converter(converters.ClientUIDConverter, 'client-uid')
11 urlpatterns = [
13 path('register/',
14 registration.RegistrationView.as_view(),
15 name='register'),
17 path('registration_complete/',
18 registration.TemplateView.as_view(
19 template_name='registration/registration_complete.html'),
20 name='registration-complete'),
22 path('activate/<str:activation_key>',
23 registration.ActivationView.as_view()),
25 path('registration/resend',
26 registration.ResendActivationView.as_view(),
27 name='resend-activation'),
29 path('registration/resent',
30 registration.ResentActivationView.as_view(),
31 name='resent-activation'),
33 path('account/',
34 settings.account,
35 name='account'),
37 path('account/privacy',
38 settings.privacy,
39 name='privacy'),
41 path('account/profile',
42 settings.ProfileView.as_view(),
43 name='profile'),
45 path('account/google/remove',
46 settings.AccountRemoveGoogle.as_view(),
47 name='account-google-remove'),
49 path('account/privacy/default-public',
50 settings.DefaultPrivacySettings.as_view(public=True),
51 name='privacy_default_public'),
53 path('account/privacy/default-private',
54 settings.DefaultPrivacySettings.as_view(public=False),
55 name='privacy_default_private'),
57 path('account/privacy/<uuid:podcast_id>/public',
58 settings.PodcastPrivacySettings.as_view(public=True),
59 name='privacy_podcast_public'),
61 path('account/privacy/<uuid:podcast_id>/private',
62 settings.PodcastPrivacySettings.as_view(public=False),
63 name='privacy_podcast_private'),
65 path('account/delete',
66 settings.delete_account,
67 name='delete-account'),
69 path('devices/',
70 device.overview,
71 name='devices'),
73 path('devices/create-device',
74 device.create,
75 name='device-create'),
77 path('device/<client-uid:uid>.opml',
78 device.opml,
79 name='device-opml'),
81 path('device/<client-uid:uid>$',
82 device.show,
83 name='device'),
85 path('device/<client-uid:uid>/symbian.opml',
86 device.symbian_opml,
87 name='device-symbian-opml'),
89 path('device/<client-uid:uid>/sync',
90 device.sync,
91 name='device-sync'),
93 path('device/<client-uid:uid>/unsync',
94 device.unsync,
95 name='device-unsync'),
97 path('device/<client-uid:uid>/resync',
98 device.resync,
99 name='trigger-sync'),
101 path('device/<client-uid:uid>/delete',
102 device.delete,
103 name='device-delete'),
105 path('device/<client-uid:uid>/remove',
106 device.delete_permanently,
107 name='device-delete-permanently'),
109 path('device/<client-uid:uid>/undelete',
110 device.undelete,
111 name='device-undelete'),
113 path('device/<client-uid:uid>/edit',
114 device.edit,
115 name='device-edit'),
117 path('device/<client-uid:uid>/update',
118 device.update,
119 name='device-update'),
121 path('device/<client-uid:uid>/upload-opml',
122 device.upload_opml,
123 name='device-upload-opml'),
125 path('register/restore_password',
126 user.restore_password,
127 name='restore-password'),
129 path('login/',
130 user.LoginView.as_view(),
131 name='login'),
133 path('login/google',
134 user.GoogleLogin.as_view(),
135 name='login-google'),
137 path('login/oauth2callback',
138 user.GoogleLoginCallback.as_view(),
139 name='login-google-callback'),
141 path('logout/',
142 LogoutView.as_view(),
143 kwargs={'next_page': '/'},
144 name='logout'),