I just saw this in the 
docs: https://docs.djangoproject.com/en/2.0/ref/models/fields/#null

Suggesting that you should never set a CharField to null unless using a 
unique index.

Is this generally accepted? Historically I've always nulled a CharField 
because using empty strings, as opposed to letting a column be nullable, 
has felt very dirty to me.

I would have expected (not suggesting this as a change) an empty string to 
fail if the field isn't nullable.

Am I on my own here?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/28b6a2c4-564d-4c7c-8498-9c3d5cba5958%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to