django - Maintaining URL parameters across page views -
i writing django application , provide optional filters , sort options results displayed. represent these optional filters , sort options using restful urls such as
- /
- /tags/tag1/
- /tags/tag1/page2
- /tags/tag1/by/newest-desc/
- /tags/tag1/by/newest-desc/page2
etc.
how should maintain existing url filters or sort options across page views? have tried using
{% url 'list-view' tags=tags sort=sort-option %}
in templates these cause problems when viewing pages without both tags , sort-option parameters set.
this problem similar using both sort & filter on queryset looking restful url solution, not parameter or session state variable solution.
any suggestions appreciated.
niall
sort order should get
parameter should page number. they'll easier handle way.
think way: /tags/tag1
indicate viewing. other 2 indicate display options.
Comments
Post a Comment