summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2012-04-05 20:52:53 +0200
committerPierre-Yves Chibon <pingou@pingoured.fr>2012-04-05 20:52:53 +0200
commit9462600628677b842c7e69d47a07f0b4581a897f (patch)
tree3f30620dc041a5ac703538ed8e60be0ccb9dacd8
parentf0d0d2c269e6a8274cd64f55210d7b104ab8bb81 (diff)
downloadhyperkitty-9462600628677b842c7e69d47a07f0b4581a897f.tar.gz
hyperkitty-9462600628677b842c7e69d47a07f0b4581a897f.tar.xz
hyperkitty-9462600628677b842c7e69d47a07f0b4581a897f.zip
The order of the regex matters, urls with a trailing slash should be before the one without
-rw-r--r--urls.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/urls.py b/urls.py
index 4c9bdf2..057bc73 100644
--- a/urls.py
+++ b/urls.py
@@ -32,13 +32,14 @@ urlpatterns = patterns('',
# Search
#url(r'^search$', 'views.pages.search'),
# If page number is present in URL
- url(r'^search/(?P<mlist_fqdn>.*@.*)\/(?P<target>.*)\/(?P<keyword>.*)\/(?P<page>\d+)$', 'views.pages.search_keyword'),
url(r'^search/(?P<mlist_fqdn>.*@.*)\/(?P<target>.*)\/(?P<keyword>.*)\/(?P<page>\d+)/$', 'views.pages.search_keyword'),
+ url(r'^search/(?P<mlist_fqdn>.*@.*)\/(?P<target>.*)\/(?P<keyword>.*)\/(?P<page>\d+)$', 'views.pages.search_keyword'),
# Show the first page as default when no page number is present in URL
- url(r'^search/(?P<mlist_fqdn>.*@.*)\/(?P<target>.*)\/(?P<keyword>.*)$', 'views.pages.search_keyword'),
url(r'^search/(?P<mlist_fqdn>.*@.*)\/(?P<target>.*)\/(?P<keyword>.*)/$', 'views.pages.search_keyword'),
- url(r'^search/(?P<mlist_fqdn>.*@.*)$', 'views.pages.search'),
+ url(r'^search/(?P<mlist_fqdn>.*@.*)\/(?P<target>.*)\/(?P<keyword>.*)$', 'views.pages.search_keyword'),
+
url(r'^search/(?P<mlist_fqdn>.*@.*)/$', 'views.pages.search'),
+ url(r'^search/(?P<mlist_fqdn>.*@.*)$', 'views.pages.search'),
url(r'^tag/(?P<mlist_fqdn>.*@.*)\/(?P<tag>.*)$', 'views.pages.search_tag'),
# mockups:
url(r'^mockup/$', 'views.mockup.index'),