http.QueryDict.urlencode()

QueryDict.urlencode(safe=None) [source]

Returns a string of the data in query-string format. Example:

>>> q = QueryDict('a=2&b=3&b=5')
>>> q.urlencode()
'a=2&b=3&b=5'

Optionally, urlencode can be passed characters which do not require encoding. For example:

>>> q = QueryDict(mutable=True)
>>> q['next'] = '/a&b/'
>>> q.urlencode(safe='/')
'next=/a%26b/'
doc_Django
2016-10-09 18:38:56
Comments
Leave a Comment

Please login to continue.