Permalink
Browse files

Merge pull request #15 from mlavin/patch-1

Update url username matching to match regex allowed by Django
  • Loading branch information...
2 parents dab8f20 + 39dd8bb commit 394a951322bc5d2b43c9b8b88b6576f3c4c31973 @coleifer coleifer committed Dec 14, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 relationships/urls.py
View
6 relationships/urls.py
@@ -2,7 +2,7 @@
urlpatterns = patterns('relationships.views',
url(r'^$', 'relationship_redirect', name='relationship_list_base'),
- url(r'^(?P<username>[\w-]+)/(?:(?P<status_slug>[\w-]+)/)?$', 'relationship_list', name='relationship_list'),
- url(r'^add/(?P<username>[\w-]+)/(?P<status_slug>[\w-]+)/$', 'relationship_handler', {'add': True}, name='relationship_add'),
- url(r'^remove/(?P<username>[\w-]+)/(?P<status_slug>[\w-]+)/$', 'relationship_handler', {'add': False}, name='relationship_remove'),
+ url(r'^(?P<username>[\w.@+-]+)/(?:(?P<status_slug>[\w-]+)/)?$', 'relationship_list', name='relationship_list'),
+ url(r'^add/(?P<username>[\w.@+-]+)/(?P<status_slug>[\w-]+)/$', 'relationship_handler', {'add': True}, name='relationship_add'),
+ url(r'^remove/(?P<username>[\w.@+-]+)/(?P<status_slug>[\w-]+)/$', 'relationship_handler', {'add': False}, name='relationship_remove'),
)

0 comments on commit 394a951

Please sign in to comment.