summaryrefslogtreecommitdiff
path: root/django/db/models/fields/proxy.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-04-21 16:34:33 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-04-21 16:34:33 +0000
commit3fb57d47bd8d4f6c1d61c9fd9564ae6c1c262027 (patch)
tree16e76b00e62efeba6ed61ae4dd7b4cc4a6ebb13c /django/db/models/fields/proxy.py
parente8eac3290126d94580618cb4dac44cd2a7d258d6 (diff)
downloaddjango-3fb57d47bd8d4f6c1d61c9fd9564ae6c1c262027.tar.gz
Fixed #13328 -- Ensured that querysets on models with callable defaults can be pickled. No, really this time. Thanks to Alex for his help brainstorming the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/fields/proxy.py')
-rw-r--r--django/db/models/fields/proxy.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/django/db/models/fields/proxy.py b/django/db/models/fields/proxy.py
index 10da0dd431..c0cc873f4c 100644
--- a/django/db/models/fields/proxy.py
+++ b/django/db/models/fields/proxy.py
@@ -11,9 +11,7 @@ class OrderWrt(fields.IntegerField):
Meta.order_with_respect_to is specified.
"""
- def __init__(self, model, *args, **kwargs):
+ def __init__(self, *args, **kwargs):
+ kwargs['name'] = '_order'
+ kwargs['editable'] = False
super(OrderWrt, self).__init__(*args, **kwargs)
- self.model = model
- self.attname = '_order'
- self.column = '_order'
- self.name = '_order'