summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTobias Kunze <r@rixx.de>2019-04-27 17:49:14 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-05-17 12:49:19 +0200
commit85b698449f8d79ebd086c0d6fae58964ed765c55 (patch)
treea3472fdf95302d33eae6f5acb4295d17ff305ce7 /docs
parent4ef96cce6a7ab302227ab3df0b57179e1c392c3c (diff)
[2.2.x] Fixed #30395 -- Doc'd a limitation of ModelForm.Meta.widgets.
Backport of a309821c973cf3bcfe817bb71163fcccc461cec1 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/forms/modelforms.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index fe2e231a36..4073bc6e27 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -522,7 +522,9 @@ For example, if you want the ``CharField`` for the ``name`` attribute of
}
The ``widgets`` dictionary accepts either widget instances (e.g.,
-``Textarea(...)``) or classes (e.g., ``Textarea``).
+``Textarea(...)``) or classes (e.g., ``Textarea``). Note that the ``widgets``
+dictionary is ignored for a model field with a non-empty ``choices`` attribute.
+In this case, you must override the form field to use a different widget.
Similarly, you can specify the ``labels``, ``help_texts`` and ``error_messages``
attributes of the inner ``Meta`` class if you want to further customize a field.