canonical-django team mailing list archive
-
canonical-django team
-
Mailing list archive
-
Message #00008
Re: list_filter for showing null dates
On Tue, 2009-11-03 at 14:26 -0600, Matthew Nuzum wrote:
> In my model I have list_filter set so that one of the fields is
> "expires" (a DateField). In the admin it gives me filters for "Any
> date" "Today" "Past 7 days" etc. I'd really like to have a "null"
> option so that I can see the records w/ no expires value. Anyone know
> a way to do this? This app is using 0.96.
According to these articles:
http://stackoverflow.com/questions/991926/custom-filter-in-django-admin
http://my.opera.com/curaloucura/blog/2009/02/17/custom-filter-on-django-admin
you should be able to extend the default admin filters to achieve the
functionality you're after. I haven't checked if this is supported in
0.96.
HTH
Stu
Follow ups
References