djangosnippets.org: Latest snippets tagged with 'clean url'https://djangosnippets.org/tags/clean-url/2011-09-27T16:33:30.407625-05:00django-pagination with "clean url"
2011-09-27T16:33:30.407625-05:00pafahttps://djangosnippets.org/snippets/2555/<p>To enable "clean url" mode, install <a href="http://code.google.com/p/django-pagination/">django-pagination</a>,
then just add to settings.py
PAGINATION_CLEAN_URL = True
and replace '.../pagination/templatetags/pagination_tags.py' with follow, and so
add to 'pagination/templates/pagination/' folder
pagination_clean_url.html
file, with following code</p>
<p><strong>Note:</strong>
in urls.py
should be like this:</p>
<p>url(r'^/foo/bar/\d*/?$', foobar_list_handle),</p>
Freely redistributable