mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.11.x] Double quoted HTML attributes in widget docs
Backport of 7741d4e8787809b38df970aa11df8bdad4f22dd8 from master.
This commit is contained in:
parent
4401e3be36
commit
a14af7f1bb
@ -525,7 +525,7 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
|||||||
|
|
||||||
* ``input_type``: ``'password'``
|
* ``input_type``: ``'password'``
|
||||||
* ``template_name``: ``'django/forms/widgets/password.html'``
|
* ``template_name``: ``'django/forms/widgets/password.html'``
|
||||||
* Renders as: ``<input type='password' ...>``
|
* Renders as: ``<input type="password" ...>``
|
||||||
|
|
||||||
Takes one optional argument:
|
Takes one optional argument:
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
|||||||
|
|
||||||
* ``input_type``: ``'hidden'``
|
* ``input_type``: ``'hidden'``
|
||||||
* ``template_name``: ``'django/forms/widgets/hidden.html'``
|
* ``template_name``: ``'django/forms/widgets/hidden.html'``
|
||||||
* Renders as: ``<input type='hidden' ...>``
|
* Renders as: ``<input type="hidden" ...>``
|
||||||
|
|
||||||
Note that there also is a :class:`MultipleHiddenInput` widget that
|
Note that there also is a :class:`MultipleHiddenInput` widget that
|
||||||
encapsulates a set of hidden input elements.
|
encapsulates a set of hidden input elements.
|
||||||
@ -553,7 +553,7 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
|||||||
|
|
||||||
* ``input_type``: ``'text'``
|
* ``input_type``: ``'text'``
|
||||||
* ``template_name``: ``'django/forms/widgets/date.html'``
|
* ``template_name``: ``'django/forms/widgets/date.html'``
|
||||||
* Renders as: ``<input type='text' ...>``
|
* Renders as: ``<input type="text" ...>``
|
||||||
|
|
||||||
Takes same arguments as :class:`TextInput`, with one more optional argument:
|
Takes same arguments as :class:`TextInput`, with one more optional argument:
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
|||||||
|
|
||||||
* ``input_type``: ``'text'``
|
* ``input_type``: ``'text'``
|
||||||
* ``template_name``: ``'django/forms/widgets/datetime.html'``
|
* ``template_name``: ``'django/forms/widgets/datetime.html'``
|
||||||
* Renders as: ``<input type='text' ...>``
|
* Renders as: ``<input type="text" ...>``
|
||||||
|
|
||||||
Takes same arguments as :class:`TextInput`, with one more optional argument:
|
Takes same arguments as :class:`TextInput`, with one more optional argument:
|
||||||
|
|
||||||
@ -595,7 +595,7 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
|||||||
|
|
||||||
* ``input_type``: ``'text'``
|
* ``input_type``: ``'text'``
|
||||||
* ``template_name``: ``'django/forms/widgets/time.html'``
|
* ``template_name``: ``'django/forms/widgets/time.html'``
|
||||||
* Renders as: ``<input type='text' ...>``
|
* Renders as: ``<input type="text" ...>``
|
||||||
|
|
||||||
Takes same arguments as :class:`TextInput`, with one more optional argument:
|
Takes same arguments as :class:`TextInput`, with one more optional argument:
|
||||||
|
|
||||||
@ -623,7 +623,7 @@ Selector and checkbox widgets
|
|||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
These widgets make use of the HTML elements ``<select>``,
|
These widgets make use of the HTML elements ``<select>``,
|
||||||
``<input type='checkbox'>``, and ``<input type='radio'>``.
|
``<input type="checkbox">``, and ``<input type="radio">``.
|
||||||
|
|
||||||
Widgets that render multiple choices have an ``option_template_name`` attribute
|
Widgets that render multiple choices have an ``option_template_name`` attribute
|
||||||
that specifies the template used to render each choice. For example, for the
|
that specifies the template used to render each choice. For example, for the
|
||||||
@ -637,7 +637,7 @@ that specifies the template used to render each choice. For example, for the
|
|||||||
|
|
||||||
* ``input_type``: ``'checkbox'``
|
* ``input_type``: ``'checkbox'``
|
||||||
* ``template_name``: ``'django/forms/widgets/checkbox.html'``
|
* ``template_name``: ``'django/forms/widgets/checkbox.html'``
|
||||||
* Renders as: ``<input type='checkbox' ...>``
|
* Renders as: ``<input type="checkbox" ...>``
|
||||||
|
|
||||||
Takes one optional argument:
|
Takes one optional argument:
|
||||||
|
|
||||||
@ -680,7 +680,7 @@ that specifies the template used to render each choice. For example, for the
|
|||||||
* ``option_template_name``: ``'django/forms/widgets/select_option.html'``
|
* ``option_template_name``: ``'django/forms/widgets/select_option.html'``
|
||||||
|
|
||||||
Similar to :class:`Select`, but allows multiple selection:
|
Similar to :class:`Select`, but allows multiple selection:
|
||||||
``<select multiple='multiple'>...</select>``
|
``<select multiple="multiple">...</select>``
|
||||||
|
|
||||||
``RadioSelect``
|
``RadioSelect``
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
@ -696,7 +696,7 @@ that specifies the template used to render each choice. For example, for the
|
|||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><input type='radio' name='...'></li>
|
<li><input type="radio" name="..."></li>
|
||||||
...
|
...
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -791,7 +791,7 @@ that specifies the template used to render each choice. For example, for the
|
|||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><input type='checkbox' name='...' ></li>
|
<li><input type="checkbox" name="..." ></li>
|
||||||
...
|
...
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -818,7 +818,7 @@ File upload widgets
|
|||||||
.. class:: FileInput
|
.. class:: FileInput
|
||||||
|
|
||||||
* ``template_name``: ``'django/forms/widgets/file.html'``
|
* ``template_name``: ``'django/forms/widgets/file.html'``
|
||||||
* Renders as: ``<input type='file' ...>``
|
* Renders as: ``<input type="file" ...>``
|
||||||
|
|
||||||
``ClearableFileInput``
|
``ClearableFileInput``
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -826,7 +826,7 @@ File upload widgets
|
|||||||
.. class:: ClearableFileInput
|
.. class:: ClearableFileInput
|
||||||
|
|
||||||
* ``template_name``: ``'django/forms/widgets/clearable_file_input.html'``
|
* ``template_name``: ``'django/forms/widgets/clearable_file_input.html'``
|
||||||
* Renders as: ``<input type='file' ...>`` with an additional checkbox
|
* Renders as: ``<input type="file" ...>`` with an additional checkbox
|
||||||
input to clear the field's value, if the field is not required and has
|
input to clear the field's value, if the field is not required and has
|
||||||
initial data.
|
initial data.
|
||||||
|
|
||||||
@ -841,7 +841,7 @@ Composite widgets
|
|||||||
.. class:: MultipleHiddenInput
|
.. class:: MultipleHiddenInput
|
||||||
|
|
||||||
* ``template_name``: ``'django/forms/widgets/multiple_hidden.html'``
|
* ``template_name``: ``'django/forms/widgets/multiple_hidden.html'``
|
||||||
* Renders as: multiple ``<input type='hidden' ...>`` tags
|
* Renders as: multiple ``<input type="hidden" ...>`` tags
|
||||||
|
|
||||||
A widget that handles multiple hidden widgets for fields that have a list
|
A widget that handles multiple hidden widgets for fields that have a list
|
||||||
of values.
|
of values.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user