thomst / django-more-admin-filters

Django-more-admin-filters is a collection of django admin filters with a focus on filters using dropdown widgets, multiple choice filters and filters working with annotated attributes.
BSD 3-Clause "New" or "Revised" License
98 stars 26 forks source link

Question about MultiSelectFilter #14

Open resource-not-found-blank opened 3 years ago

resource-not-found-blank commented 3 years ago

Hello! Example code:

models.py

STATUS = [
    (0, 'Enabled'),
    (1, 'Disabled'),
    (2, 'Deprecated'),
    ...
]
...
status = models.IntegerField(choices=STATUS)

admin.py

list_filter = [('status', MultiSelectFilter),]

As a result, the numbers in the filter, not the values:

Снимок экрана 2021-08-11 в 11 13 32
clemsau commented 3 years ago

Hello !

This is a known issue, and it has been addressed by a potential contributor in the PR #3

But this code hasn't been merged yet as the tests were not all passing, and it seems like both the lib author and the contributor are very busy.

You could still copy the code of the MultiSelectChoicesFilter from the PR #3 and apply it in your own project, it should be working perfectly ! :smiley: