Last active
August 25, 2024 23:07
-
-
Save benbacardi/d6cd0fb8c85e1547c3c60f95f5b2d5e1 to your computer and use it in GitHub Desktop.
Django query_transform templatetag
Great! Tanks! (line 19: for Python 3 rename iteritems() to items())
If you are working with djangos pagination and your template takes care of the page keyword, simply adding
query.pop('page', None)
before returning the query does the trick.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@cursologo-gh, try using the safe parameter of urlencode.
From django docs: Use safe to pass characters which don’t require encoding. For example: