Hi Carlton,

There are some cases where I really do want an empty string displayed
(though not in a linked column). Maybe only use it only when it's an
auto-linked field/column? Or maybe only use this behavior in
display_for_field()? (So if you use a custom function/method, you can still
have full control.)

Thanks,
Collin


On Wed, Feb 7, 2018 at 5:30 AM, Carlton Gibson <carlton.gib...@gmail.com>
wrote:

> [Better Subject] Fix admin change list display of empty string values.
>
> I'll summarise; I'd like to elicit any objections.
>
> The issue is that the admin change list doesn't display the "empty value"
> placeholder for empty strings,
> which is the recommended way of handling "nullable" CharFields.
>
> The image attached to the issue demonstrates the issue nicely:
>
>
> <https://lh3.googleusercontent.com/-o2BvgWHPd1c/WnrTUY-qo5I/AAAAAAAAGEg/sIRIGYqf2agMkUeZwvQ9YngLnBhXSI43ACLcBGAs/s1600/empty_string%2Bbug.png>
>
> These rows won't even be clickable.
>
> Options:
>
> 1. Make the existing admin `empty_value_display` option also handle empty
> strings.
> 2. Add a new admin option for empty strings, separate from `None`
> (null=True) cases.
>
> We have PR that's not too far off for option 1.
>
> More to the point I'm in favour of option 1 because:
>
> * We have enough admin options already
> * The empty string is just how text-type fields handle the `null` case.
> (i.e. this should already be the behaviour.)
>
> *Are there any reasons we can't adjust `empty_value_display` to also be
> used for empty strings?*
>
> Original Issue: https://code.djangoproject.com/ticket/28404
> PR: https://github.com/django/django/pull/9391
>
> Thanks for the input all!
>
> Kind Regards,
>
> Carlton
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/92b12dbc-ace6-4d72-9234-
> 5563625446b2%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/92b12dbc-ace6-4d72-9234-5563625446b2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFO84S6Wo193A2G4aGqJo_dpQqGgVRC8RnFTmfy71R1RxrgwiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to