Login

Tag "urlquote"

Snippet List

urlquote() and urlencode() in one method

I think this method is handy, since you don't need to remember if you need urlquote or urlencode. It does both and adds a question mark between the path and the get parameters, if later are present. And it works around a bug in Django: MultiValueDicts (request.GET, request.POST) are handled correctly. Related: [http://code.djangoproject.com/ticket/9089](http://code.djangoproject.com/ticket/9089)

  • urlquote
  • urlencode
Read More

1 snippet posted so far.