Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4009 closed (duplicate)

Model validator does not allow parent fields for Admin list_filter

Reported by: simon@… Owned by: Adrian Holovaty
Component: Validators Version: master
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: UI/UX:


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)

admin_list_filter.diff (2.0 KB) - added by simon@… 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by simon@…

Attachment: admin_list_filter.diff added

comment:1 Changed 11 years ago by simon@…

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 :-|

comment:2 Changed 11 years ago by James Bennett

Resolution: duplicate
Status: newclosed

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.

comment:3 Changed 11 years ago by James Bennett

(duplicate of #1656)

Note: See TracTickets for help on using tickets.
Back to Top