1
0
mirror of https://github.com/django/django.git synced 2025-07-21 01:59:26 +00:00

[3.0.x] Corrected outputting BooleanField as HTML in forms docs.

Backport of 34a69c24584ec7d842dbf266659b25527cd73909 from master
This commit is contained in:
Tim Schilling 2020-03-30 20:11:10 -05:00 committed by Mariusz Felisiak
parent cb10c33e27
commit a3e4591020

View File

@ -470,10 +470,10 @@ Notice the following:
* Each field type has a default HTML representation. ``CharField`` is * Each field type has a default HTML representation. ``CharField`` is
represented by an ``<input type="text">`` and ``EmailField`` by an represented by an ``<input type="text">`` and ``EmailField`` by an
``<input type="email">``. ``<input type="email">``. ``BooleanField(null=False)`` is represented by an
``BooleanField`` is represented by an ``<input type="checkbox">``. Note ``<input type="checkbox">``. Note these are merely sensible defaults; you can
these are merely sensible defaults; you can specify which HTML to use for specify which HTML to use for a given field by using widgets, which we'll
a given field by using widgets, which we'll explain shortly. explain shortly.
* The HTML ``name`` for each tag is taken directly from its attribute name * The HTML ``name`` for each tag is taken directly from its attribute name
in the ``ContactForm`` class. in the ``ContactForm`` class.