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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -