Closed jcmcken closed 5 years ago
Hm, I haven't tried that myself. What version of Django are you using?
>>> import django
>>> django.__version__
'2.0.4'
Typically if somefield
is the field, you would use the get_somefield_display
helper method that Django provides, which automatically converts the short form of the choice to the long form
Are you using ChoiceDropdownFilter
?
In case you are and it still does not work:
My assumption would be that {{ choice.display }}
will take care of this in the template layer as that's what Django's admin and FeinCMS use. But perhaps things have changed. Do you care to investigate this a bit? If yes, take a look at the following:
templates/admin/filter.html
do this nowadays?ChoicesFieldListFilter
that ChoiceDropdownFilter
?@jcmcken, assuming you were not using ChoiceDropdowFilter
, closing. Please feel free to reopen if this is not the case.
In the default Django filter, the verbose name is shown when a
CharField
filter haschoices
. When I enable your filter classes, I only get the short name, which isn't really recognizable or useful for filtering.