#36286: if I specify `null=False, blank=False` in a `models.TextField`, django
should not generate a blank string for me
-------------------------------+--------------------------------------
Reporter: bwo | Owner: (none)
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 5.1
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Clifford Gama):
* resolution: => wontfix
* status: new => closed
Comment:
See #35671 and https://forum.djangoproject.com/t/get-or-create-and-create-
with-unspecified-non-nullable-fields/33755.
Empty strings do not violate `null=False` and they are the default empty
value for string-based fields. If you don't want them as defaults,
consider setting `default=None`. `blank=False will only disallow them in
forms, not in Python code.
--
Ticket URL: <https://code.djangoproject.com/ticket/36286#comment:1>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070195f6c97f7c-a5cdfd6a-4da6-4fbf-9368-db149767fc0f-000000%40eu-central-1.amazonses.com.