Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for #14 #15

Closed
wants to merge 4 commits into from

2 participants

@dmoisset

This is a fix for #14, which also merges mattions' fix for #9

@dmoisset

Sorry, I made a mistake in the regex, I'll fix first

@dmoisset dmoisset closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 14, 2012
  1. @mattions
  2. @mattions

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

    mattions authored
    …n url.
    
    With the previous order create and edit were recognised as username and a 404 page was given as response. This fix #9
Commits on Jun 28, 2012
  1. @dmoisset
  2. @dmoisset

    Fixed regexes for urls

    dmoisset authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 8 deletions.
  1. +1 −0  .gitignore
  2. +9 −8 idios/urls.py
View
1  .gitignore
@@ -1,2 +1,3 @@
docs/_build/*
idios*.egg-info/
+*.pyc
View
17 idios/urls.py
@@ -7,21 +7,22 @@
if not idios.settings.USE_USERNAME:
profile_detail_default = url(r"^profile/(?P<pk>\d+)/$", ProfileDetailView.as_view(), name="profile_detail")
else:
- profile_detail_default = url(r"^profile/(?P<username>[\w\._-]+)/$", ProfileDetailView.as_view(), name="profile_detail")
+ profile_detail_default = url(r"^profile/(?P<username>[\w\._-+@]+)/$", ProfileDetailView.as_view(), name="profile_detail")
urlpatterns = patterns("idios.views",
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"^(?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"),
+ 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"),
)
Something went wrong with that request. Please try again.