Skip to content
Browse files

Fix the url order, to avoid the clash between usernames and the actio…

…n url.

With the previous order create and edit were recognised as username and a 404 page was given as response. This fix #9
  • Loading branch information...
1 parent 997b087 commit 384a02b3b2fdbd01b7ecc7645ec0dd5595348ca7 @mattions mattions committed Jun 14, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 idios/urls.py
View
11 idios/urls.py
@@ -14,14 +14,15 @@
url(r"^$", ProfileListView.as_view(), name="profile_list"),
url(r"^all/$", ProfileListView.as_view(all_profiles=True), name="profile_list_all"),
- url(r"^(?P<profile_slug>[\w\._-]+)/$", ProfileListView.as_view(), name="profile_list"),
-
- profile_detail_default,
- url(r"^(?P<profile_slug>[\w\._-]+)/profile/(?P<pk>\d+)/$", ProfileDetailView.as_view(), name="profile_detail"),
-
+
url(r"^edit/$", ProfileUpdateView.as_view(), name="profile_edit"),
url(r"^(?P<profile_slug>[\w\._-]+)/edit/$", ProfileUpdateView.as_view(), name="profile_edit"),
url(r"^create/$", ProfileCreateView.as_view(), name="profile_create"),
url(r"^(?P<profile_slug>[\w\._-]+)/create/$", ProfileCreateView.as_view(), name="profile_create"),
+
+ profile_detail_default,
+ url(r"^(?P<profile_slug>[\w\._-]+)/profile/(?P<pk>\d+)/$", ProfileDetailView.as_view(), name="profile_detail"),
+
+ url(r"^(?P<profile_slug>[\w\._-]+)/$", ProfileListView.as_view(), name="profile_list"),
)

0 comments on commit 384a02b

Please sign in to comment.
Something went wrong with that request. Please try again.