summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2021-09-30 21:40:01 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-10-05 06:09:54 +0200
commitcd6bddd44e0a1c3c6a96a3677f8366ef0e4b6782 (patch)
treea52cbee8bdef578751434fc627d7f2f5ba6e436d /docs
parentd400b08a8baa697905daadd47a6ba12336e93336 (diff)
Fixed #22224 -- Added note about supplying missing values for non-nullable fields with blank=True.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 73c0560374..7f6762909a 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -73,6 +73,12 @@ purely database-related, whereas :attr:`~Field.blank` is validation-related. If
a field has ``blank=True``, form validation will allow entry of an empty value.
If a field has ``blank=False``, the field will be required.
+.. admonition:: Supplying missing values
+
+ ``blank=True`` can be used with fields having ``null=False``, but this will
+ require implementing :meth:`~django.db.models.Model.clean` on the model in
+ order to programmatically supply any missing values.
+
.. _field-choices:
``choices``