Created
March 22, 2012 14:11
-
-
Save mdellavo/2158560 to your computer and use it in GitHub Desktop.
Django shortcut to generate a url w/ query params (for serious)
This file contains 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