Inline admin on generic relations ignores exclude and max_num
|Reported by:||danielr||Owned by:||nobody|
|Severity:||Keywords:||admin, generic relations|
|Cc:||semente@…, alexr||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
GenericInlineModelAdmin, in contrib.contenttypes.generic, passes most of the usual admin parameters into generic_inlineformset_factory to create the inline formset - but for no obvious reason it omits exclude and max_num, so values for these are ignored.
Patch just adds these, and coerces exclude to a list (rather than a tuple) so that the content_type fields can be automatically appended without breaking.
Change History (11)
Changed 8 years ago by danielr
comment:1 Changed 8 years ago by mtredinnick
- Needs documentation unset
- Needs tests set
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted