Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/gpp/accounts/urls.py Sun Dec 05 20:58:58 2010 +0000 +++ b/gpp/accounts/urls.py Thu Dec 23 23:36:53 2010 +0000 @@ -5,7 +5,7 @@ urlpatterns = patterns('accounts.views', url(r'^register/$', 'register', name='accounts-register'), (r'^register/thanks/$', 'register_thanks'), - (r'^register/confirm/(?P<username>\w{1,30})/(?P<key>[a-zA-Z0-9]{20})/$', 'register_confirm'), + (r'^register/confirm/(?P<username>[\w.@+-]{1,30})/(?P<key>[a-zA-Z0-9]{20})/$', 'register_confirm'), ) urlpatterns += patterns('', @@ -16,13 +16,13 @@ url(r'^logout/$', 'django.contrib.auth.views.logout', kwargs={'template_name': 'accounts/logout.html'}, - name='accounts-logout'), - (r'^password/$', - 'django.contrib.auth.views.password_change', + name='accounts-logout'), + (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', + 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/'},