# HG changeset patch # User Brian Neal # Date 1293147413 0 # Node ID 0dd8989abef2d291035ace7a0680c964df403232 # Parent 4ba879ccdc6247447e9636ee35952d675c455b2c Fix regexes for usernames in various urls.py files to match valid Django usernames diff -r 4ba879ccdc62 -r 0dd8989abef2 gpp/accounts/urls.py --- 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\w{1,30})/(?P[a-zA-Z0-9]{20})/$', 'register_confirm'), + (r'^register/confirm/(?P[\w.@+-]{1,30})/(?P[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/'}, diff -r 4ba879ccdc62 -r 0dd8989abef2 gpp/bio/urls.py --- a/gpp/bio/urls.py Sun Dec 05 20:58:58 2010 +0000 +++ b/gpp/bio/urls.py Thu Dec 23 23:36:53 2010 +0000 @@ -2,12 +2,12 @@ from django.conf.urls.defaults import * urlpatterns = patterns('bio.views', - url(r'^members/(?Puser|date)/$', - 'member_list', + url(r'^members/(?Puser|date)/$', + 'member_list', name='bio-member_list'), url(r'^members/search/$', 'member_search', name='bio-member_search'), url(r'^me/$', 'my_profile', name='bio-me'), - url(r'^view/(?P\w{1,30})/$', 'view_profile', name='bio-view_profile'), + url(r'^view/(?P[\w.@+-]{1,30})/$', 'view_profile', name='bio-view_profile'), url(r'^edit/$', 'edit_profile', name='bio-edit_profile'), url(r'^edit/elsewhere/$', 'edit_elsewhere', name='bio-edit_elsewhere'), url(r'^avatar/$', 'change_avatar', name='bio-change_avatar'), diff -r 4ba879ccdc62 -r 0dd8989abef2 gpp/forums/urls.py --- a/gpp/forums/urls.py Sun Dec 05 20:58:58 2010 +0000 +++ b/gpp/forums/urls.py Thu Dec 23 23:36:53 2010 +0000 @@ -23,7 +23,7 @@ url(r'^post/(\d+)/$', 'goto_post', name='forums-goto_post'), url(r'^post/ip/(\d+)/$', 'post_ip_info', name='forums-post_ip_info'), url(r'^post/new/(?P\d+)/$', 'new_post', name='forums-new_post'), - url(r'^posts/(?P[\w\d-]+)/$', 'posts_for_user', name='forums-posts_for_user'), + url(r'^posts/(?P[\w.@+-]{1,30})/$', 'posts_for_user', name='forums-posts_for_user'), url(r'^quick-reply/$', 'quick_reply_ajax', name='forums-quick_reply'), url(r'^unanswered/$', 'unanswered_topics', name='forums-unanswered_topics'), url(r'^unread/$', 'unread_topics', name='forums-unread_topics'), diff -r 4ba879ccdc62 -r 0dd8989abef2 gpp/messages/urls.py --- a/gpp/messages/urls.py Sun Dec 05 20:58:58 2010 +0000 +++ b/gpp/messages/urls.py Thu Dec 23 23:36:53 2010 +0000 @@ -8,7 +8,7 @@ url(r'^view/(\d+)/$', 'view', name='messages-view'), url(r'^reply/(\d+)/$', 'reply', name='messages-reply'), url(r'^compose/$', 'compose', name='messages-compose'), - url(r'^compose/(\w+)/$', 'compose', name='messages-compose_to'), + url(r'^compose/([\w.@+-]{1,30})/$', 'compose', name='messages-compose_to'), url(r'^delete/$', 'delete_bulk', name='messages-delete_bulk'), url(r'^delete/(\d+)/$', 'delete', name='messages-delete'), url(r'^undelete/$', 'undelete_bulk', name='messages-undelete_bulk'), @@ -20,5 +20,3 @@ (r'^$', 'redirect_to', {'url': 'inbox/'}), ) - -# vim: ts=4 sw=4