Skip to content

Instantly share code, notes, and snippets.

@mdellavo
Created March 22, 2012 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mdellavo/2158560 to your computer and use it in GitHub Desktop.
Save mdellavo/2158560 to your computer and use it in GitHub Desktop.
Django shortcut to generate a url w/ query params (for serious)
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