You need to use a Django SimpleListFilter; e.g. see
http://gpiot.com/blog/django-cookbook-custom-admin-list-filters/
or
https://www.elements.nl/2015/03/16/getting-the-most-out-of-django-admin-filters/
On Tuesday, 31 May 2016 13:52:06 UTC+2, Brad Rice wrote:
-- http://gpiot.com/blog/django-cookbook-custom-admin-list-filters/
or
https://www.elements.nl/2015/03/16/getting-the-most-out-of-django-admin-filters/
On Tuesday, 31 May 2016 13:52:06 UTC+2, Brad Rice wrote:
I have a field that has two values set "S" or "E". I use it to filter records in the admin. I would like the values in the filter to be spelled out as "Signature" and "Emerging". How do I have it show like that in Admin?
This is my filter:
list_filter = ('app_complete', 'app_type')
app_type is the field I want to change how the field values show to filter on.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e84d5a1f-b760-471f-98f1-e2f8b61f837d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment