Ticket #6453: 6453.diff
File 6453.diff, 886 bytes (added by , 17 years ago) |
---|
-
django/newforms/models.py
160 160 opts = instance._meta 161 161 data = {} 162 162 for f in opts.fields + opts.many_to_many: 163 if not f.editable: 163 if fields is not None: 164 if not f.name in fields: 165 continue 166 elif not f.editable: 167 # Only check if a field is not editable if a fields list was not 168 # provided. Otherwise even non-editable fields should be included 169 # in the returned dict since they were explicitly requested. 164 170 continue 165 if fields and not f.name in fields:166 continue167 171 if exclude and f.name in exclude: 168 172 continue 169 173 if isinstance(f, ManyToManyField):