summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2013-03-24 18:40:40 +0200
committerAnssi Kääriäinen <akaariai@gmail.com>2013-03-24 18:40:40 +0200
commit97774429aeb54df4c09895c07cd1b09e70201f7d (patch)
treeb3c4478bf72def9ad18d11b1eecefbe6979e9ebc /django/forms
parent266de5f9ae9e9f2fbfaec3b7e4b5fb9941967801 (diff)
Fixed #19385 again, now with real code changes
The commit of 266de5f9ae9e9f2fbfaec3b7e4b5fb9941967801 included only tests, this time also code changes included...
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 0672bafc47..39d753b1a6 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -110,7 +110,7 @@ def model_to_dict(instance, fields=None, exclude=None):
from django.db.models.fields.related import ManyToManyField
opts = instance._meta
data = {}
- for f in opts.fields + opts.many_to_many:
+ for f in opts.concrete_fields + opts.many_to_many:
if not f.editable:
continue
if fields and not f.name in fields:
@@ -149,7 +149,7 @@ def fields_for_model(model, fields=None, exclude=None, widgets=None, formfield_c
field_list = []
ignored = []
opts = model._meta
- for f in sorted(opts.fields + opts.many_to_many):
+ for f in sorted(opts.concrete_fields + opts.many_to_many):
if not f.editable:
continue
if fields is not None and not f.name in fields: