Opened 10 years ago
Closed 10 years ago
#24898 closed Bug (needsinfo)
QueryDict serialization into session
Reported by: | EralpB | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.8 |
Severity: | Normal | Keywords: | session, serialization, QueryDict |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
We are having an issue with QueryDict serialization, one system is Linux the other one is Windows.
dict2 = {'a': 'one', 'b': 'two', } qdict = QueryDict('', mutable=True) qdict.update(dict2) print qdict request.session['lal'] = qdict #and then in another view I do: print request.session['lal']
This outputs:
Linux:
<QueryDict: {u'a': ['one'], u'b': ['two']}> {u'a': u'one', u'b': u'two'}
Windows:
<QueryDict: {u'a': ['one'], u'b': ['two']}> {u'a': [u'one'], u'b': [u'two']}
Why the difference?
Windows:
Django==1.8 django-ckeditor==4.4.8 django-crispy-forms==1.4.0 django-enumfield==1.2.1 django-phonenumber-field==0.7.2 django-social-auth==0.7.28 easy-thumbnails==2.2 httplib2==0.9.1 oauth2==1.5.211 oauthlib==0.7.2 phonenumbers==7.0.4 Pillow==2.8.1 psycopg2==2.6 PyJWT==1.1.0 python-openid==2.2.5 python-slugify==1.0.2 python-social-auth==0.2.9 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 Unidecode==0.4.17
Linux:
Django==1.8 django-ckeditor==4.4.8 django-crispy-forms==1.4.0 django-enumfield==1.2.1 django-phonenumber-field==0.7.2 django-social-auth==0.7.28 easy-thumbnails==2.2 httplib2==0.9.1 oauth2==1.5.211 oauthlib==0.7.2 phonenumbers==7.0.4 Pillow==2.8.1 psycopg2==2.6 PyJWT==1.1.0 python-openid==2.2.5 python-slugify==1.0.2 python-social-auth==0.2.9 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 Unidecode==0.4.17
Change History (3)
comment:1 by , 10 years ago
Component: | Uncategorized → Forms |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Could you write a test for Django's test suite that demonstrates the issue or provide a minimal project that we can download to reproduce the issue (ideally, that doesn't have any third-party dependencies)?