Merge branch 'master' into static-media
[mygpo.git] / mygpo / users / urls.py
blobfef682b5af4cf66958d7993e24eb53a52343eddf
1 from django.conf.urls import url
2 from django.contrib.auth.views import LogoutView
3 from django.views.generic.base import TemplateView
5 from .views import registration, settings, device, user
8 urlpatterns = [
10 url(r'^register/$',
11 registration.RegistrationView.as_view(),
12 name='register'),
14 url(r'^registration_complete/$',
15 registration.TemplateView.as_view(
16 template_name='registration/registration_complete.html'),
17 name='registration-complete'),
19 url(r'^activate/(?P<activation_key>\w+)$',
20 registration.ActivationView.as_view()),
22 url(r'^registration/resend$',
23 registration.ResendActivationView.as_view(),
24 name='resend-activation'),
26 url(r'^registration/resent$',
27 registration.ResentActivationView.as_view(),
28 name='resent-activation'),
30 url(r'^account/$',
31 settings.account,
32 name='account'),
34 url(r'^account/privacy$',
35 settings.privacy,
36 name='privacy'),
38 url(r'^account/profile$',
39 settings.ProfileView.as_view(),
40 name='profile'),
42 url(r'^account/google/remove$',
43 settings.AccountRemoveGoogle.as_view(),
44 name='account-google-remove'),
46 url(r'^account/privacy/default-public$',
47 settings.DefaultPrivacySettings.as_view(public=True),
48 name='privacy_default_public'),
50 url(r'^account/privacy/default-private$',
51 settings.DefaultPrivacySettings.as_view(public=False),
52 name='privacy_default_private'),
54 url(r'^account/privacy/(?P<podcast_id>[\w]+)/public$',
55 settings.PodcastPrivacySettings.as_view(public=True),
56 name='privacy_podcast_public'),
58 url(r'^account/privacy/(?P<podcast_id>[\w]+)/private$',
59 settings.PodcastPrivacySettings.as_view(public=False),
60 name='privacy_podcast_private'),
62 url(r'^account/delete$',
63 settings.delete_account,
64 name='delete-account'),
66 url(r'^devices/$',
67 device.overview,
68 name='devices'),
70 url(r'^devices/create-device$',
71 device.create,
72 name='device-create'),
74 url(r'^device/(?P<uid>[\w.-]+)\.opml$',
75 device.opml,
76 name='device-opml'),
78 url(r'^device/(?P<uid>[\w.-]+)$',
79 device.show,
80 name='device'),
82 url(r'^device/(?P<uid>[\w.-]+)/symbian.opml$',
83 device.symbian_opml,
84 name='device-symbian-opml'),
86 url(r'^device/(?P<uid>[\w.-]+)/sync$',
87 device.sync,
88 name='device-sync'),
90 url(r'^device/(?P<uid>[\w.-]+)/unsync$',
91 device.unsync,
92 name='device-unsync'),
94 url(r'^device/(?P<uid>[\w.-]+)/resync$',
95 device.resync,
96 name='trigger-sync'),
98 url(r'^device/(?P<uid>[\w.-]+)/delete$',
99 device.delete,
100 name='device-delete'),
102 url(r'^device/(?P<uid>[\w.-]+)/remove$',
103 device.delete_permanently,
104 name='device-delete-permanently'),
106 url(r'^device/(?P<uid>[\w.-]+)/undelete$',
107 device.undelete,
108 name='device-undelete'),
110 url(r'^device/(?P<uid>[\w.-]+)/edit$',
111 device.edit,
112 name='device-edit'),
114 url(r'^device/(?P<uid>[\w.-]+)/update$',
115 device.update,
116 name='device-update'),
118 url(r'^device/(?P<uid>[\w.-]+)/upload-opml$',
119 device.upload_opml,
120 name='device-upload-opml'),
122 url(r'^register/restore_password$',
123 user.restore_password,
124 name='restore-password'),
126 url(r'^login/$',
127 user.LoginView.as_view(),
128 name='login'),
130 url(r'^login/google$',
131 user.GoogleLogin.as_view(),
132 name='login-google'),
134 url(r'^login/oauth2callback$',
135 user.GoogleLoginCallback.as_view(),
136 name='login-google-callback'),
138 url(r'^logout/$',
139 LogoutView.as_view(),
140 kwargs={'next_page': '/'},
141 name='logout'),