Commit 720984e5 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Generalized sort urls.

parent 5ec40258
......@@ -3,8 +3,11 @@ from django.conf.urls import patterns, include, url
urlpatterns = patterns('website.views',
#### Available filters
url(r'^section/(?P<section>[a-zA-Z]+ {0,1}[0-9]*)$', 'index', name='filter_by_section'),
url(r'^date$', 'index', {'sort': 'date'}, name='sort_by_date'),
url(r'^comments$', 'index', {'sort': 'comments'}, name='sort_by_comments'),
url(r'^section/(?P<section>[a-zA-Z]+ {0,1}[0-9]*)$', 'index',
url(r'^(?P<sort>[a-z]*)$', 'index', name='sort'),
url(r'^section/(?P<section>[a-zA-Z]+ {0,1}[0-9]*)/(?P<sort>[a-z]*)$',
'index', name='filter'),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment