1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #10184: QueryDicts with multiple values can now be safely pickled. Thanks, Alex Gaynor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2009-03-31 05:14:13 +00:00
parent 62353e8fe7
commit 9ae873fcd8
3 changed files with 21 additions and 2 deletions

View File

@@ -396,10 +396,18 @@ u'\ufffd'
# Pickling a QueryDict #
########################
>>> import pickle
>>> q = QueryDict('')
>>> q1 = pickle.loads(pickle.dumps(q, 2))
>>> q == q1
True
>>> q = QueryDict('a=b&c=d')
>>> q1 = pickle.loads(pickle.dumps(q, 2))
>>> q == q1
True
>>> q = QueryDict('a=b&c=d&a=1')
>>> q1 = pickle.loads(pickle.dumps(q, 2))
>>> q == q1
True
######################################
# HttpResponse with Unicode headers #