How to customize admin filter in Django 1.4

10,577

There is new django.contrib.admin.SimpleListFilter introduced in v1.4 meet your need, and official document provide sample code and easy to read. search SimpleListFilter in this section.

Share:
10,577
destiny1020
Author by

destiny1020

Updated on September 15, 2022

Comments

  • destiny1020
    destiny1020 almost 2 years

    I am a newbie in Python and Django Development, I learned a lot from the easy read examples provided by the community. But recently I want to implement a customized admin filter for the admin console shipped with Django. I searched a lot and only found some out-of-date approaches to get it done. Such as: Custom Filter in Django Admin on Django 1.3 or below

    I tried to read the source code for the filters module in 'django.contrib.admin' app, but unfortunately I can hardly understand the rationale behind the codes. So I wonder whether some kind people could supply some examples or references to this issue --- How to customize admin filter in Django 1.4 ?

    Thanks in advance!