mirror of
https://github.com/django/django.git
synced 2025-07-22 18:49:25 +00:00
[2.0.x] Fixed a couple mistakes in docs/ref/forms/widgets.txt.
Backport of e0eab28f9f3440f68c5ed318554e3537976b816f from master
This commit is contained in:
parent
0fd21febe7
commit
172e5132ba
@ -228,9 +228,9 @@ foundation for custom widgets.
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> from django import forms
|
||||
>>> name = forms.TextInput(attrs={'size': 10, 'title': 'Your name',})
|
||||
>>> name = forms.TextInput(attrs={'size': 10, 'title': 'Your name'})
|
||||
>>> name.render('name', 'A name')
|
||||
'<input title="Your name" type="text" name="name" value="A name" size="10" required />'
|
||||
'<input title="Your name" type="text" name="name" value="A name" size="10" />'
|
||||
|
||||
If you assign a value of ``True`` or ``False`` to an attribute,
|
||||
it will be rendered as an HTML5 boolean attribute::
|
||||
@ -795,8 +795,7 @@ that specifies the template used to render each choice. For example, for the
|
||||
* ``template_name``: ``'django/forms/widgets/checkbox_select.html'``
|
||||
* ``option_template_name``: ``'django/forms/widgets/checkbox_option.html'``
|
||||
|
||||
Similar to :class:`SelectMultiple`, but rendered as a list of check
|
||||
buttons:
|
||||
Similar to :class:`SelectMultiple`, but rendered as a list of checkboxes:
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user