#29635: can't pass int value to QueryDict Instance
-----------------------------------------+------------------------
Reporter: dhcn | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
the code
{{{
query_dict["offset"] = self.length
}}}
the querydict is {"offset":[100]}
will give the error:
{{{
File "/usr/local/lib/python3.5/dist-packages/django/http/request.py" in
urlencode
524. for v in list_
File "/usr/local/lib/python3.5/dist-packages/django/http/request.py" in
<genexpr>
524. for v in list_
Exception Type: AttributeError at /zhaohuogan/archives/
Exception Value: 'int' object has no attribute 'encode'
}}}
the bugfixed code is:
{{{
query_dict["offset"] = str(self.length)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29635>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/047.dd28a46a4a81f703c8a4367d9799968a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.