You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAIK, CharField(blank=True,...) just means that the string can be 0-length, and doesn't mean that it's Optional/nullable. The documentation on blank also seems to suggest this, saying that it "will allow the entry of an empty value", which for a string is just a 0-length string.
* Make CharField(blank=True) not be considered nullable
The documentation on [blank](https://docs.djangoproject.com/en/2.1/ref/models/fields/#blank) says that it "will allow the entry of an empty value", which for a string is just a 0-length string. This patch allows `CharField(blank=True,...)` to no longer be considered `Optional`.
closes#38
* fixed tests for `CharField(blank=True)`
* allow blank CharField to be nullable in the constructor, but the underlying type
is str (unless `null=True`)
AFAIK,
CharField(blank=True,...)
just means that the string can be 0-length, and doesn't mean that it'sOptional
/nullable. The documentation onblank
also seems to suggest this, saying that it "will allow the entry of an empty value", which for a string is just a 0-length string.I think the offending code is fields.py:105
I can make a pull request to remove (or comment out) that block of code if needed
The text was updated successfully, but these errors were encountered: