#8528: Admin list_filter doesn't respect null=True ------------------------------------------------+--------------------------- Reporter: StevenPotter | Owner: julien Status: new | Milestone: 1.3 Component: django.contrib.admin | Version: 1.3-alpha Resolution: | Keywords: Triage Stage: Accepted | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | ------------------------------------------------+---------------------------
Comment (by julien): OK, I've written a patch based on marcob's, with some small tweaks. In particular I'm using EMPTY_CHANGELIST_VALUE (instead of _('None')) for consistency with the way NULL values are displayed in readonly fields and in the changelist, and also to dissociate it from the 'All' filter which has a different purpose. The tests are based on oyvind's patch and I've also added tests for the FK and M2M filters. Let me know what you think. I'm particularly wondering about the condition "if hasattr(self.field, 'rel')" which I had to add to avoid breaking the existing admin views tests. -- Ticket URL: <http://code.djangoproject.com/ticket/8528#comment:20> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.