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

Made it possible to pickle DateQuerySets.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2008-08-20 22:38:15 +00:00
parent eb85af1865
commit b9407b26df
4 changed files with 31 additions and 11 deletions

View File

@@ -897,6 +897,10 @@ Bug #8283 -- Checking that applying filters after a disjunction works correctly.
>>> (ExtraInfo.objects.filter(info='e2')|ExtraInfo.objects.filter(note=n1)).filter(note=n1)
[<ExtraInfo: e1>]
Pickling of DateQuerySets used to fail
>>> qs = Item.objects.dates('created', 'month')
>>> _ = pickle.loads(pickle.dumps(qs))
"""}
# In Python 2.3, exceptions raised in __len__ are swallowed (Python issue