Opened 18 years ago

Closed 18 years ago

Last modified 18 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: 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)

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

Download all attachments as: .zip

Change History (4)

by simon@…, 18 years ago

Attachment: admin_list_filter.diff added

comment:1 by simon@…, 18 years ago

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 by James Bennett, 18 years ago

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 by James Bennett, 18 years ago

(duplicate of #1656)

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