comparison gpp/accounts/urls.py @ 78:4edfea7f8620

#29 - Implementing the forgotten password reset process.
author Brian Neal <bgneal@gmail.com>
date Sun, 12 Jul 2009 18:02:44 +0000
parents eecbd00e092a
children 0dd8989abef2
comparison
equal deleted inserted replaced
77:d5eed0a91a05 78:4edfea7f8620
7 (r'^register/thanks/$', 'register_thanks'), 7 (r'^register/thanks/$', 'register_thanks'),
8 (r'^register/confirm/(?P<username>\w{1,30})/(?P<key>[a-zA-Z0-9]{20})/$', 'register_confirm'), 8 (r'^register/confirm/(?P<username>\w{1,30})/(?P<key>[a-zA-Z0-9]{20})/$', 'register_confirm'),
9 ) 9 )
10 10
11 urlpatterns += patterns('', 11 urlpatterns += patterns('',
12 url(r'^login/', 12 url(r'^login/$',
13 'django.contrib.auth.views.login', 13 'django.contrib.auth.views.login',
14 kwargs={'template_name': 'accounts/login.html'}, 14 kwargs={'template_name': 'accounts/login.html'},
15 name='accounts-login'), 15 name='accounts-login'),
16 url(r'^logout/', 16 url(r'^logout/$',
17 'django.contrib.auth.views.logout', 17 'django.contrib.auth.views.logout',
18 kwargs={'template_name': 'accounts/logout.html'}, 18 kwargs={'template_name': 'accounts/logout.html'},
19 name='accounts-logout'), 19 name='accounts-logout'),
20 (r'^password/', 20 (r'^password/$',
21 'django.contrib.auth.views.password_change', 21 'django.contrib.auth.views.password_change',
22 {'template_name': 'accounts/password_change.html', 22 {'template_name': 'accounts/password_change.html',
23 'post_change_redirect': settings.LOGIN_REDIRECT_URL}), 23 'post_change_redirect': settings.LOGIN_REDIRECT_URL}),
24 url(r'^password/reset/$',
25 'django.contrib.auth.views.password_reset',
26 kwargs={'template_name': 'accounts/password_reset.html',
27 'email_template_name': 'accounts/password_reset_email.txt',
28 'post_reset_redirect': '/accounts/password/reset/sent/'},
29 name='accounts-password_reset'),
30 url(r'^password/reset/sent/$',
31 'django.contrib.auth.views.password_reset_done',
32 kwargs={'template_name': 'accounts/password_reset_sent.html'},
33 name='accounts-password_reset_sent'),
34 url(r'^password/reset/confirm/(?P<uidb36>[0-9a-z]+)/(?P<token>[0-9a-z]+-\w+)/$',
35 'django.contrib.auth.views.password_reset_confirm',
36 kwargs={
37 'template_name': 'accounts/password_reset_confirm.html',
38 'post_reset_redirect': '/accounts/password/reset/success/',
39 },
40 name='accounts-password_reset_confirm'),
41 url(r'^password/reset/success/$',
42 'django.contrib.auth.views.password_reset_complete',
43 kwargs={'template_name': 'accounts/password_reset_complete.html'},
44 name='accounts-password_reset_success'),
24 ) 45 )
25 46