diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-04-21 16:34:33 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-04-21 16:34:33 +0000 |
| commit | 3fb57d47bd8d4f6c1d61c9fd9564ae6c1c262027 (patch) | |
| tree | 16e76b00e62efeba6ed61ae4dd7b4cc4a6ebb13c /django/db/models/fields/proxy.py | |
| parent | e8eac3290126d94580618cb4dac44cd2a7d258d6 (diff) | |
| download | django-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.py | 8 |
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' |
