diff 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
line wrap: on
line diff
--- a/gpp/accounts/urls.py	Fri Jul 10 23:56:02 2009 +0000
+++ b/gpp/accounts/urls.py	Sun Jul 12 18:02:44 2009 +0000
@@ -9,17 +9,38 @@
 )
 
 urlpatterns += patterns('',
-    url(r'^login/',
+    url(r'^login/$',
         'django.contrib.auth.views.login',
         kwargs={'template_name': 'accounts/login.html'},
         name='accounts-login'),
-    url(r'^logout/',
+    url(r'^logout/$',
         'django.contrib.auth.views.logout',
         kwargs={'template_name': 'accounts/logout.html'},
         name='accounts-logout'), 
-    (r'^password/', 
+    (r'^password/$', 
         'django.contrib.auth.views.password_change', 
         {'template_name': 'accounts/password_change.html',
          'post_change_redirect': settings.LOGIN_REDIRECT_URL}),
+    url(r'^password/reset/$', 
+        'django.contrib.auth.views.password_reset', 
+        kwargs={'template_name': 'accounts/password_reset.html',
+         'email_template_name': 'accounts/password_reset_email.txt',
+         'post_reset_redirect': '/accounts/password/reset/sent/'},
+        name='accounts-password_reset'),
+    url(r'^password/reset/sent/$',
+        'django.contrib.auth.views.password_reset_done',
+        kwargs={'template_name': 'accounts/password_reset_sent.html'},
+        name='accounts-password_reset_sent'),
+    url(r'^password/reset/confirm/(?P<uidb36>[0-9a-z]+)/(?P<token>[0-9a-z]+-\w+)/$',
+        'django.contrib.auth.views.password_reset_confirm',
+        kwargs={
+            'template_name': 'accounts/password_reset_confirm.html',
+            'post_reset_redirect': '/accounts/password/reset/success/',
+            },
+        name='accounts-password_reset_confirm'),
+    url(r'^password/reset/success/$',
+        'django.contrib.auth.views.password_reset_complete',
+        kwargs={'template_name': 'accounts/password_reset_complete.html'},
+        name='accounts-password_reset_success'),
 )