Ticket #8620: django_model_forms_excluding_fields_fix.diff
File django_model_forms_excluding_fields_fix.diff, 742 bytes (added by , 16 years ago) |
---|
-
forms/models.py
201 201 opts.exclude, formfield_callback) 202 202 # Override default model fields with any custom declared ones 203 203 # (plus, include all the other declared fields). 204 if opts.fields: 205 [declared_fields.pop(f) for f in declared_fields.keys() if f not in opts.fields] 206 if opts.exclude: 207 [declared_fields.pop(f) for f in declared_fields.keys() if f in opts.exclude] 204 208 fields.update(declared_fields) 205 209 else: 206 210 fields = declared_fields