﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26277	The list_display for CharField doesn't work for None value among choices	Petr Dlouhý	Vincenzo Pandolfo	"I have a following model field:

{{{      
      DIRECTIONS = [
          ('trip_to', ""From""),
          ('trip_from', ""To""),
          (None, ""None""),
          ('', ""-""),
      ]

      direction = models.CharField(
          verbose_name=""direction"",
          choices=DIRECTIONS,
          max_length=20,
          null=True, blank=True)
}}}

I want to filter out the items with direction set to Null in my admin list display. Both the choices (`None` and `''`) are displayed in the filter, but none of them works. The None choice generates URL without the `direction__exact` parameter. The `''` choice generates `direction__exact=` parameter, which also does not work.
What work is, if I set the URL parameter manually to `direction__isnull=True`, but the link is not generated that way.

My suggestion is, that when the CharField has `null=True` and `blank=True`, then there is always ''Unknown'' choice in `list_filter` and if the `None` or `''` is in choices, than the choice is named that way.
"	New feature	closed	contrib.admin	1.9	Normal	fixed	list_filter CharField admin		Accepted	1	0	0	0	0	1
