gremmie@1
|
1 """urls for the accounts application"""
|
bgneal@1028
|
2 from django.conf.urls import url
|
bgneal@76
|
3 from django.conf import settings
|
bgneal@1028
|
4 import django.contrib.auth.views as auth_views
|
bgneal@659
|
5 from django.views.generic import TemplateView
|
gremmie@1
|
6
|
bgneal@1028
|
7 import accounts.views
|
bgneal@1028
|
8
|
bgneal@1028
|
9 urlpatterns = [
|
bgneal@1028
|
10 url(r'^register/$', accounts.views.register, name='accounts-register'),
|
bgneal@1028
|
11 url(r'^register/1/$', accounts.views.register1, name='accounts-register1'),
|
bgneal@1028
|
12 url(r'^register/2/$', accounts.views.register2, name='accounts-register2'),
|
bgneal@1028
|
13 url(r'^register/code/$', accounts.views.get_code, name='accounts-code'),
|
bgneal@1028
|
14 url(r'^register/thanks/$', accounts.views.register_thanks, name='accounts-register_thanks'),
|
bgneal@905
|
15 url(r'^register/confirm/(?P<username>[\w.@+-]{1,30})/(?P<key>[a-zA-Z0-9]{20})/$',
|
bgneal@1028
|
16 accounts.views.register_confirm,
|
bgneal@905
|
17 name='accounts-register_confirm'),
|
bgneal@1028
|
18 ]
|
gremmie@1
|
19
|
bgneal@1028
|
20 urlpatterns += [
|
bgneal@78
|
21 url(r'^login/$',
|
bgneal@1028
|
22 auth_views.login,
|
gremmie@1
|
23 kwargs={'template_name': 'accounts/login.html'},
|
gremmie@1
|
24 name='accounts-login'),
|
bgneal@78
|
25 url(r'^logout/$',
|
bgneal@1028
|
26 auth_views.logout,
|
gremmie@1
|
27 kwargs={'template_name': 'accounts/logout.html'},
|
bgneal@289
|
28 name='accounts-logout'),
|
bgneal@1028
|
29 url(r'^password/$',
|
bgneal@1028
|
30 auth_views.password_change,
|
gremmie@1
|
31 {'template_name': 'accounts/password_change.html',
|
bgneal@76
|
32 'post_change_redirect': settings.LOGIN_REDIRECT_URL}),
|
bgneal@289
|
33 url(r'^password/reset/$',
|
bgneal@1028
|
34 auth_views.password_reset,
|
bgneal@78
|
35 kwargs={'template_name': 'accounts/password_reset.html',
|
bgneal@78
|
36 'email_template_name': 'accounts/password_reset_email.txt',
|
bgneal@78
|
37 'post_reset_redirect': '/accounts/password/reset/sent/'},
|
bgneal@78
|
38 name='accounts-password_reset'),
|
bgneal@78
|
39 url(r'^password/reset/sent/$',
|
bgneal@1028
|
40 auth_views.password_reset_done,
|
bgneal@78
|
41 kwargs={'template_name': 'accounts/password_reset_sent.html'},
|
bgneal@78
|
42 name='accounts-password_reset_sent'),
|
bgneal@752
|
43 url(r'^password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9a-z]+-\w+)/$',
|
bgneal@1028
|
44 auth_views.password_reset_confirm,
|
bgneal@78
|
45 kwargs={
|
bgneal@78
|
46 'template_name': 'accounts/password_reset_confirm.html',
|
bgneal@78
|
47 'post_reset_redirect': '/accounts/password/reset/success/',
|
bgneal@78
|
48 },
|
bgneal@78
|
49 name='accounts-password_reset_confirm'),
|
bgneal@78
|
50 url(r'^password/reset/success/$',
|
bgneal@1028
|
51 auth_views.password_reset_complete,
|
bgneal@78
|
52 kwargs={'template_name': 'accounts/password_reset_complete.html'},
|
bgneal@78
|
53 name='accounts-password_reset_success'),
|
bgneal@659
|
54 url(r'^username/query/$',
|
bgneal@1028
|
55 accounts.views.username_query,
|
bgneal@659
|
56 name='accounts-username_query'),
|
bgneal@659
|
57 url(r'^username/sent/$',
|
bgneal@659
|
58 TemplateView.as_view(template_name='accounts/username_sent.html'),
|
bgneal@659
|
59 name='accounts-username_sent'),
|
bgneal@1028
|
60 ]
|