V
V
Viktor Yurchenko2019-07-08 11:20:26
Django
Viktor Yurchenko, 2019-07-08 11:20:26

How to make filter - "list_filter" in django admin by method, not model field?

Now in list_filter" you can do side filtering only by the model field by the method, you can't do that.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FulTupFul, 2019-07-10
@Witosser

No. At a minimum, you need to create a class that inherits from SimpleListFilter and implement several methods: lookups and queryset.
Everything is described in detail in the documentation - https://docs.djangoproject.com/en/2.2/ref/contrib/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question