Forked from mdellavo/django-reverse-with-query-params.py
Created
March 14, 2018 11:21
-
-
Save mitrofun/5ec45192d27117ebf687b418a9cd139d to your computer and use it in GitHub Desktop.
Django shortcut to generate a url w/ query params (for serious)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def reverse_with_queryparams(view, *args, **kwargs): | |
| return reverse(view, args=args) + '?' + urllib.urlencode(kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment