#17789: when i use a custom FieldListFilter class for a given field.
---------------------------------+--------------------------------------
Reporter: Kidwind | Owner: julien
Type: Bug | Status: reopened
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution:
Keywords: FieldListFilter | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by KyleMac):
* status: closed => reopened
* version: 1.3 => 1.4
* resolution: needsinfo =>
Comment:
I've also run into this problem.
My situation is that I have the same model appearing in `list_display` and
`list_filter` but through different relationships. `List_display` is
showing the current supplier whereas `list_filter` can be used to find all
items supplied by a specified supplier in the past.
This creates an issue where I have a column named "supplier" and a filter
named "supplier" but the filter is not the same as the column. To clarify
this I wanted to create a `SimpleListFilter` and set the `title` attribute
to something more descriptive but this raises a `SuspiciousOperation` and
as far as I can tell there is no other way to change the display title for
filters.
If this is to be considered a feature and not a bug then the documentation
needs to be clarified. Julien says that the documentation states that the
first element must be a "field name", but two bullet points up the docs
call `company__name` a "field name".
--
Ticket URL: <https://code.djangoproject.com/ticket/17789#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.