#28404: Django admin empty_value/empty_value_display doesn't check for empty
strings
-------------------------------------+-------------------------------------
     Reporter:  Mark Koh             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  empty value display  |             Triage Stage:
  admin charfield                    |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------

Comment (by Mark Koh):

 I would definitely find it useful if it worked with empty strings as well
 as `None`.  Currently we have a field in our ModelAdmin that is a
 `CharField` with `blank=True` and `null=False` and that field is also
 specified in the `list_display_links`.  Thus, when that field value is an
 empty string we are unable to click it (you can see this in the image
 attached to this ticket).

 Seeing as the `blank=True, null=False` method is the recommended method
 for supporting nullable CharFields I imagine that I'm not the only person
 whose seen this problem.  I am open to either allowing
 `empty_value_display` to acknowledge empty strings or to creating a new
 optional attribute for empty strings.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28404#comment:4>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.a5973131ce44d63b4864dcb98bde48b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to