Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jean Michel Rouly
research-questions
Commits
9a068e3b
Commit
9a068e3b
authored
Mar 08, 2014
by
Jean Michel Rouly
Browse files
Named filter urls
parent
79451e84
Changes
1
Hide whitespace changes
Inline
Side-by-side
researchquestions/website/filters/urls.py
View file @
9a068e3b
...
...
@@ -3,8 +3,8 @@ 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'
),
url
(
r
'^date$'
,
'index'
,
{
'sort'
:
'date'
}),
url
(
r
'^comments$'
,
'index'
,
{
'sort'
:
'comments'
}),
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'
),
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment