4

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!

cezar
  • 11,616
  • 6
  • 48
  • 84
destiny1020
  • 119
  • 2
  • 3
  • 10

1 Answers1

6

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.

Bikash kharel
  • 472
  • 7
  • 16
Michael
  • 325
  • 1
  • 7