Opened 18 years ago
Closed 17 years ago
#4085 closed (worksforme)
Admin list_filter not working with foreignkey field
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 0.96 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have a model that uses this field:
item = models.ForeignKey(Item, validator_list=[item_available])
In the same model's Admin class, I have:
list_filter = ['item', 'foo', 'bar']
In the admin filter panel, fields foo and bar display as filters, but item does not. If I remove all other fields from list_filter, the foreignkey field still does not display; it displays no filters at all.
Change History (3)
follow-up: 2 comment:1 by , 17 years ago
comment:2 by , 17 years ago
Replying to Yaggo:
Confirm this bug with SVN revision 5468 (2007-06-13).
I cancel my confirmation - list_filter _does_ work with ForeignKeys, but the filter won't be displayed unless there are more than one choices available.
comment:3 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Pretty sure this works for me too. Feel free to reopen if you can provide more details.
Confirm this bug with SVN revision 5468 (2007-06-13).