#4009 closed (duplicate)
Model validator does not allow parent fields for Admin list_filter
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Validators | Version: | dev |
Severity: | Keywords: | Admin list_filter model inheritance validator | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Admin list_filter doesn't seem to recognise fields inherited from a model's base class.
Here is a patch which fixes that, along the same lines as list_display.
NOTE, this patch also includes another one called list_filter.diff, which allows related fields in list_filter.
BTW, my two cents worth on model inheritance is 'keep it simple'. Do nothing with database views/relations etc unless specified. Obviously those features would be great but aren't suitable for all cases.
Attachments (1)
Change History (4)
by , 18 years ago
Attachment: | admin_list_filter.diff added |
---|
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Well, the specific root of this problem is that Django does not currently support model inheritance; anything which works is largely an accident at this point, though it is slated to be worked out before 1.0.
OK I got this far then found Admin flatly doesn't like inherited models anyway. I guess there might be a way to fix this at a lower level, so inherited fields are recognised the same as locally declared ones, but I don't have time right now :-|