comparison gpp/accounts/urls.py @ 289:0dd8989abef2

Fix regexes for usernames in various urls.py files to match valid Django usernames
author Brian Neal <bgneal@gmail.com>
date Thu, 23 Dec 2010 23:36:53 +0000
parents 4edfea7f8620
children 886cc99e8406
comparison
equal deleted inserted replaced
288:4ba879ccdc62 289:0dd8989abef2
3 from django.conf import settings 3 from django.conf import settings
4 4
5 urlpatterns = patterns('accounts.views', 5 urlpatterns = patterns('accounts.views',
6 url(r'^register/$', 'register', name='accounts-register'), 6 url(r'^register/$', 'register', name='accounts-register'),
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/$', 24 url(r'^password/reset/$',
25 'django.contrib.auth.views.password_reset', 25 'django.contrib.auth.views.password_reset',
26 kwargs={'template_name': 'accounts/password_reset.html', 26 kwargs={'template_name': 'accounts/password_reset.html',
27 'email_template_name': 'accounts/password_reset_email.txt', 27 'email_template_name': 'accounts/password_reset_email.txt',
28 'post_reset_redirect': '/accounts/password/reset/sent/'}, 28 'post_reset_redirect': '/accounts/password/reset/sent/'},
29 name='accounts-password_reset'), 29 name='accounts-password_reset'),
30 url(r'^password/reset/sent/$', 30 url(r'^password/reset/sent/$',