Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 django admin 中制作自定义过滤器。我的意思是编写一个方法在其中进行一些计算并将其添加到list_filter。
您可以使用从 django.contrib.admin.SimpleListFilter 继承的类,如此处所述。