Ticket #8999: modeladmin-getform-and-getformset-exclude-fix.diff
File modeladmin-getform-and-getformset-exclude-fix.diff, 928 bytes (added by , 16 years ago) |
---|
-
django/contrib/admin/options.py
270 270 defaults = { 271 271 "form": self.form, 272 272 "fields": fields, 273 "exclude": exclude + kwargs. get("exclude", []),273 "exclude": exclude + kwargs.pop("exclude", []), 274 274 "formfield_callback": self.formfield_for_dbfield, 275 275 } 276 276 defaults.update(kwargs) … … 795 795 "formset": self.formset, 796 796 "fk_name": self.fk_name, 797 797 "fields": fields, 798 "exclude": exclude + kwargs. get("exclude", []),798 "exclude": exclude + kwargs.pop("exclude", []), 799 799 "formfield_callback": self.formfield_for_dbfield, 800 800 "extra": self.extra, 801 801 "max_num": self.max_num,