summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-01-20 23:09:10 -0800
committerTim Graham <timograham@gmail.com>2018-01-21 02:09:10 -0500
commitff05de760cc4ef4c7f188e163c722ec3bc1f0cbf (patch)
treeba133d0ecea7521935c98cf1c058df4e6a9ff233 /docs/topics
parent4b0f39d9fb2033a9597e30ac13af162440b82ebc (diff)
Fixed #29038 -- Removed closing slash from HTML void tags.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/auth/default.txt4
-rw-r--r--docs/topics/forms/formsets.txt66
-rw-r--r--docs/topics/forms/index.txt10
-rw-r--r--docs/topics/forms/media.txt32
-rw-r--r--docs/topics/forms/modelforms.txt14
-rw-r--r--docs/topics/i18n/timezones.txt2
-rw-r--r--docs/topics/i18n/translation.txt12
-rw-r--r--docs/topics/pagination.txt2
-rw-r--r--docs/topics/testing/tools.txt2
9 files changed, 72 insertions, 72 deletions
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt
index 3e8a63c25f..a118e56543 100644
--- a/docs/topics/auth/default.txt
+++ b/docs/topics/auth/default.txt
@@ -1056,8 +1056,8 @@ implementation details see :ref:`using-the-views`.
</tr>
</table>
- <input type="submit" value="login" />
- <input type="hidden" name="next" value="{{ next }}" />
+ <input type="submit" value="login">
+ <input type="hidden" name="next" value="{{ next }}">
</form>
{# Assumes you setup the password_reset view in your URLconf #}
diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt
index 08c0194e53..cb07e7ad59 100644
--- a/docs/topics/forms/formsets.txt
+++ b/docs/topics/forms/formsets.txt
@@ -29,8 +29,8 @@ would with a regular form::
>>> formset = ArticleFormSet()
>>> for form in formset:
... print(form.as_table())
- <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" id="id_form-0-title" /></td></tr>
- <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date" /></td></tr>
+ <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" id="id_form-0-title"></td></tr>
+ <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date"></td></tr>
As you can see it only displayed one empty form. The number of empty forms
that is displayed is controlled by the ``extra`` parameter. By default,
@@ -69,12 +69,12 @@ example::
>>> for form in formset:
... print(form.as_table())
- <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" value="Django is now open source" id="id_form-0-title" /></td></tr>
- <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" value="2008-05-12" id="id_form-0-pub_date" /></td></tr>
- <tr><th><label for="id_form-1-title">Title:</label></th><td><input type="text" name="form-1-title" id="id_form-1-title" /></td></tr>
- <tr><th><label for="id_form-1-pub_date">Pub date:</label></th><td><input type="text" name="form-1-pub_date" id="id_form-1-pub_date" /></td></tr>
- <tr><th><label for="id_form-2-title">Title:</label></th><td><input type="text" name="form-2-title" id="id_form-2-title" /></td></tr>
- <tr><th><label for="id_form-2-pub_date">Pub date:</label></th><td><input type="text" name="form-2-pub_date" id="id_form-2-pub_date" /></td></tr>
+ <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" value="Django is now open source" id="id_form-0-title"></td></tr>
+ <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" value="2008-05-12" id="id_form-0-pub_date"></td></tr>
+ <tr><th><label for="id_form-1-title">Title:</label></th><td><input type="text" name="form-1-title" id="id_form-1-title"></td></tr>
+ <tr><th><label for="id_form-1-pub_date">Pub date:</label></th><td><input type="text" name="form-1-pub_date" id="id_form-1-pub_date"></td></tr>
+ <tr><th><label for="id_form-2-title">Title:</label></th><td><input type="text" name="form-2-title" id="id_form-2-title"></td></tr>
+ <tr><th><label for="id_form-2-pub_date">Pub date:</label></th><td><input type="text" name="form-2-pub_date" id="id_form-2-pub_date"></td></tr>
There are now a total of three forms showing above. One for the initial data
that was passed in and two extra forms. Also note that we are passing in a
@@ -103,8 +103,8 @@ gives you the ability to limit the number of forms the formset will display::
>>> formset = ArticleFormSet()
>>> for form in formset:
... print(form.as_table())
- <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" id="id_form-0-title" /></td></tr>
- <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date" /></td></tr>
+ <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" id="id_form-0-title"></td></tr>
+ <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date"></td></tr>
If the value of ``max_num`` is greater than the number of existing items in the
initial data, up to ``extra`` additional blank forms will be added to the
@@ -406,15 +406,15 @@ Lets you create a formset with the ability to order::
... ])
>>> for form in formset:
... print(form.as_table())
- <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" value="Article #1" id="id_form-0-title" /></td></tr>
- <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" value="2008-05-10" id="id_form-0-pub_date" /></td></tr>
- <tr><th><label for="id_form-0-ORDER">Order:</label></th><td><input type="number" name="form-0-ORDER" value="1" id="id_form-0-ORDER" /></td></tr>
- <tr><th><label for="id_form-1-title">Title:</label></th><td><input type="text" name="form-1-title" value="Article #2" id="id_form-1-title" /></td></tr>
- <tr><th><label for="id_form-1-pub_date">Pub date:</label></th><td><input type="text" name="form-1-pub_date" value="2008-05-11" id="id_form-1-pub_date" /></td></tr>
- <tr><th><label for="id_form-1-ORDER">Order:</label></th><td><input type="number" name="form-1-ORDER" value="2" id="id_form-1-ORDER" /></td></tr>
- <tr><th><label for="id_form-2-title">Title:</label></th><td><input type="text" name="form-2-title" id="id_form-2-title" /></td></tr>
- <tr><th><label for="id_form-2-pub_date">Pub date:</label></th><td><input type="text" name="form-2-pub_date" id="id_form-2-pub_date" /></td></tr>
- <tr><th><label for="id_form-2-ORDER">Order:</label></th><td><input type="number" name="form-2-ORDER" id="id_form-2-ORDER" /></td></tr>
+ <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" value="Article #1" id="id_form-0-title"></td></tr>
+ <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" value="2008-05-10" id="id_form-0-pub_date"></td></tr>
+ <tr><th><label for="id_form-0-ORDER">Order:</label></th><td><input type="number" name="form-0-ORDER" value="1" id="id_form-0-ORDER"></td></tr>
+ <tr><th><label for="id_form-1-title">Title:</label></th><td><input type="text" name="form-1-title" value="Article #2" id="id_form-1-title"></td></tr>
+ <tr><th><label for="id_form-1-pub_date">Pub date:</label></th><td><input type="text" name="form-1-pub_date" value="2008-05-11" id="id_form-1-pub_date"></td></tr>
+ <tr><th><label for="id_form-1-ORDER">Order:</label></th><td><input type="number" name="form-1-ORDER" value="2" id="id_form-1-ORDER"></td></tr>
+ <tr><th><label for="id_form-2-title">Title:</label></th><td><input type="text" name="form-2-title" id="id_form-2-title"></td></tr>
+ <tr><th><label for="id_form-2-pub_date">Pub date:</label></th><td><input type="text" name="form-2-pub_date" id="id_form-2-pub_date"></td></tr>
+ <tr><th><label for="id_form-2-ORDER">Order:</label></th><td><input type="number" name="form-2-ORDER" id="id_form-2-ORDER"></td></tr>
This adds an additional field to each form. This new field is named ``ORDER``
and is an ``forms.IntegerField``. For the forms that came from the initial
@@ -466,15 +466,15 @@ Lets you create a formset with the ability to select forms for deletion::
... ])
>>> for form in formset:
... print(form.as_table())
- <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" value="Article #1" id="id_form-0-title" /></td></tr>
- <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" value="2008-05-10" id="id_form-0-pub_date" /></td></tr>
- <tr><th><label for="id_form-0-DELETE">Delete:</label></th><td><input type="checkbox" name="form-0-DELETE" id="id_form-0-DELETE" /></td></tr>
- <tr><th><label for="id_form-1-title">Title:</label></th><td><input type="text" name="form-1-title" value="Article #2" id="id_form-1-title" /></td></tr>
- <tr><th><label for="id_form-1-pub_date">Pub date:</label></th><td><input type="text" name="form-1-pub_date" value="2008-05-11" id="id_form-1-pub_date" /></td></tr>
- <tr><th><label for="id_form-1-DELETE">Delete:</label></th><td><input type="checkbox" name="form-1-DELETE" id="id_form-1-DELETE" /></td></tr>
- <tr><th><label for="id_form-2-title">Title:</label></th><td><input type="text" name="form-2-title" id="id_form-2-title" /></td></tr>
- <tr><th><label for="id_form-2-pub_date">Pub date:</label></th><td><input type="text" name="form-2-pub_date" id="id_form-2-pub_date" /></td></tr>
- <tr><th><label for="id_form-2-DELETE">Delete:</label></th><td><input type="checkbox" name="form-2-DELETE" id="id_form-2-DELETE" /></td></tr>
+ <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" value="Article #1" id="id_form-0-title"></td></tr>
+ <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" value="2008-05-10" id="id_form-0-pub_date"></td></tr>
+ <tr><th><label for="id_form-0-DELETE">Delete:</label></th><td><input type="checkbox" name="form-0-DELETE" id="id_form-0-DELETE"></td></tr>
+ <tr><th><label for="id_form-1-title">Title:</label></th><td><input type="text" name="form-1-title" value="Article #2" id="id_form-1-title"></td></tr>
+ <tr><th><label for="id_form-1-pub_date">Pub date:</label></th><td><input type="text" name="form-1-pub_date" value="2008-05-11" id="id_form-1-pub_date"></td></tr>
+ <tr><th><label for="id_form-1-DELETE">Delete:</label></th><td><input type="checkbox" name="form-1-DELETE" id="id_form-1-DELETE"></td></tr>
+ <tr><th><label for="id_form-2-title">Title:</label></th><td><input type="text" name="form-2-title" id="id_form-2-title"></td></tr>
+ <tr><th><label for="id_form-2-pub_date">Pub date:</label></th><td><input type="text" name="form-2-pub_date" id="id_form-2-pub_date"></td></tr>
+ <tr><th><label for="id_form-2-DELETE">Delete:</label></th><td><input type="checkbox" name="form-2-DELETE" id="id_form-2-DELETE"></td></tr>
Similar to ``can_order`` this adds a new field to each form named ``DELETE``
and is a ``forms.BooleanField``. When data comes through marking any of the
@@ -540,9 +540,9 @@ default fields/attributes of the order and deletion fields::
>>> formset = ArticleFormSet()
>>> for form in formset:
... print(form.as_table())
- <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" id="id_form-0-title" /></td></tr>
- <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date" /></td></tr>
- <tr><th><label for="id_form-0-my_field">My field:</label></th><td><input type="text" name="form-0-my_field" id="id_form-0-my_field" /></td></tr>
+ <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" id="id_form-0-title"></td></tr>
+ <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date"></td></tr>
+ <tr><th><label for="id_form-0-my_field">My field:</label></th><td><input type="text" name="form-0-my_field" id="id_form-0-my_field"></td></tr>
.. _custom-formset-form-kwargs:
@@ -592,14 +592,14 @@ For example, in the default case, you might see:
.. code-block:: html
<label for="id_form-0-title">Title:</label>
- <input type="text" name="form-0-title" id="id_form-0-title" />
+ <input type="text" name="form-0-title" id="id_form-0-title">
But with ``ArticleFormset(prefix='article')`` that becomes:
.. code-block:: html
<label for="id_article-0-title">Title:</label>
- <input type="text" name="article-0-title" id="id_article-0-title" />
+ <input type="text" name="article-0-title" id="id_article-0-title">
This is useful if you want to :ref:`use more than one formset in a view
<multiple-formsets-in-view>`.
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt
index 86de7d1b06..71d5a37ed9 100644
--- a/docs/topics/forms/index.txt
+++ b/docs/topics/forms/index.txt
@@ -259,7 +259,7 @@ The whole form, when rendered for the first time, will look like:
.. code-block:: html+django
<label for="your_name">Your name: </label>
- <input id="your_name" type="text" name="your_name" maxlength="100" required />
+ <input id="your_name" type="text" name="your_name" maxlength="100" required>
Note that it **does not** include the ``<form>`` tags, or a submit button.
We'll have to provide those ourselves in the template.
@@ -334,7 +334,7 @@ is:
<form action="/your-name/" method="post">
{% csrf_token %}
{{ form }}
- <input type="submit" value="Submit" />
+ <input type="submit" value="Submit">
</form>
All the form's fields and their attributes will be unpacked into HTML markup
@@ -512,13 +512,13 @@ Here's the output of ``{{ form.as_p }}`` for our ``ContactForm`` instance:
.. code-block:: html+django
<p><label for="id_subject">Subject:</label>
- <input id="id_subject" type="text" name="subject" maxlength="100" required /></p>
+ <input id="id_subject" type="text" name="subject" maxlength="100" required></p>
<p><label for="id_message">Message:</label>
<textarea name="message" id="id_message" required></textarea></p>
<p><label for="id_sender">Sender:</label>
- <input type="email" name="sender" id="id_sender" required /></p>
+ <input type="email" name="sender" id="id_sender" required></p>
<p><label for="id_cc_myself">Cc myself:</label>
- <input type="checkbox" name="cc_myself" id="id_cc_myself" /></p>
+ <input type="checkbox" name="cc_myself" id="id_cc_myself"></p>
Note that each form field has an ID attribute set to ``id_<field-name>``, which
is referenced by the accompanying label tag. This is important in ensuring that
diff --git a/docs/topics/forms/media.txt b/docs/topics/forms/media.txt
index 28c5054bc3..6b9165339f 100644
--- a/docs/topics/forms/media.txt
+++ b/docs/topics/forms/media.txt
@@ -71,7 +71,7 @@ can be retrieved through this property::
>>> w = CalendarWidget()
>>> print(w.media)
- <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/animations.js"></script>
<script type="text/javascript" src="http://static.example.com/actions.js"></script>
@@ -114,9 +114,9 @@ requirements::
If this last CSS definition were to be rendered, it would become the following HTML::
- <link href="http://static.example.com/pretty.css" type="text/css" media="screen" rel="stylesheet" />
- <link href="http://static.example.com/lo_res.css" type="text/css" media="tv,projector" rel="stylesheet" />
- <link href="http://static.example.com/newspaper.css" type="text/css" media="print" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="screen" rel="stylesheet">
+ <link href="http://static.example.com/lo_res.css" type="text/css" media="tv,projector" rel="stylesheet">
+ <link href="http://static.example.com/newspaper.css" type="text/css" media="print" rel="stylesheet">
``js``
------
@@ -145,8 +145,8 @@ example above::
>>> w = FancyCalendarWidget()
>>> print(w.media)
- <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet" />
- <link href="http://static.example.com/fancy.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet">
+ <link href="http://static.example.com/fancy.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/animations.js"></script>
<script type="text/javascript" src="http://static.example.com/actions.js"></script>
<script type="text/javascript" src="http://static.example.com/whizbang.js"></script>
@@ -165,7 +165,7 @@ an ``extend=False`` declaration to the ``Media`` declaration::
>>> w = FancyCalendarWidget()
>>> print(w.media)
- <link href="http://static.example.com/fancy.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/fancy.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/whizbang.js"></script>
If you require even more control over inheritance, define your assets using a
@@ -228,7 +228,7 @@ was ``None``::
>>> w = CalendarWidget()
>>> print(w.media)
- <link href="/css/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="/css/pretty.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://uploads.example.com/animations.js"></script>
<script type="text/javascript" src="http://othersite.com/actions.js"></script>
@@ -236,7 +236,7 @@ But if :setting:`STATIC_URL` is ``'http://static.example.com/'``::
>>> w = CalendarWidget()
>>> print(w.media)
- <link href="/css/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="/css/pretty.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/animations.js"></script>
<script type="text/javascript" src="http://othersite.com/actions.js"></script>
@@ -245,7 +245,7 @@ Or if :mod:`~django.contrib.staticfiles` is configured using the
>>> w = CalendarWidget()
>>> print(w.media)
- <link href="/css/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="/css/pretty.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="https://static.example.com/animations.27e20196a850.js"></script>
<script type="text/javascript" src="http://othersite.com/actions.js"></script>
@@ -268,12 +268,12 @@ operator to filter out a medium of interest. For example::
>>> w = CalendarWidget()
>>> print(w.media)
- <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/animations.js"></script>
<script type="text/javascript" src="http://static.example.com/actions.js"></script>
>>> print(w.media['css'])
- <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet">
When you use the subscript operator, the value that is returned is a
new ``Media`` object -- but one that only contains the media of interest.
@@ -300,7 +300,7 @@ specified by both::
>>> w1 = CalendarWidget()
>>> w2 = OtherWidget()
>>> print(w1.media + w2.media)
- <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/animations.js"></script>
<script type="text/javascript" src="http://static.example.com/actions.js"></script>
<script type="text/javascript" src="http://static.example.com/whizbang.js"></script>
@@ -362,7 +362,7 @@ are part of the form::
>>> f = ContactForm()
>>> f.media
- <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/animations.js"></script>
<script type="text/javascript" src="http://static.example.com/actions.js"></script>
<script type="text/javascript" src="http://static.example.com/whizbang.js"></script>
@@ -382,8 +382,8 @@ form::
>>> f = ContactForm()
>>> f.media
- <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet" />
- <link href="http://static.example.com/layout.css" type="text/css" media="all" rel="stylesheet" />
+ <link href="http://static.example.com/pretty.css" type="text/css" media="all" rel="stylesheet">
+ <link href="http://static.example.com/layout.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="http://static.example.com/animations.js"></script>
<script type="text/javascript" src="http://static.example.com/actions.js"></script>
<script type="text/javascript" src="http://static.example.com/whizbang.js"></script>
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index 3c49e3b8e3..553271e598 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -770,14 +770,14 @@ with the ``Author`` model. It works just like a regular formset::
>>> formset = AuthorFormSet()
>>> print(formset)
- <input type="hidden" name="form-TOTAL_FORMS" value="1" id="id_form-TOTAL_FORMS" /><input type="hidden" name="form-INITIAL_FORMS" value="0" id="id_form-INITIAL_FORMS" /><input type="hidden" name="form-MAX_NUM_FORMS" id="id_form-MAX_NUM_FORMS" />
- <tr><th><label for="id_form-0-name">Name:</label></th><td><input id="id_form-0-name" type="text" name="form-0-name" maxlength="100" /></td></tr>
+ <input type="hidden" name="form-TOTAL_FORMS" value="1" id="id_form-TOTAL_FORMS"><input type="hidden" name="form-INITIAL_FORMS" value="0" id="id_form-INITIAL_FORMS"><input type="hidden" name="form-MAX_NUM_FORMS" id="id_form-MAX_NUM_FORMS">
+ <tr><th><label for="id_form-0-name">Name:</label></th><td><input id="id_form-0-name" type="text" name="form-0-name" maxlength="100"></td></tr>
<tr><th><label for="id_form-0-title">Title:</label></th><td><select name="form-0-title" id="id_form-0-title">
<option value="" selected>---------</option>
<option value="MR">Mr.</option>
<option value="MRS">Mrs.</option>
<option value="MS">Ms.</option>
- </select><input type="hidden" name="form-0-id" id="id_form-0-id" /></td></tr>
+ </select><input type="hidden" name="form-0-id" id="id_form-0-id"></td></tr>
.. note::
@@ -959,10 +959,10 @@ so long as the total number of forms does not exceed ``max_num``::
>>> formset = AuthorFormSet(queryset=Author.objects.order_by('name'))
>>> for form in formset:
... print(form.as_table())
- <tr><th><label for="id_form-0-name">Name:</label></th><td><input id="id_form-0-name" type="text" name="form-0-name" value="Charles Baudelaire" maxlength="100" /><input type="hidden" name="form-0-id" value="1" id="id_form-0-id" /></td></tr>
- <tr><th><label for="id_form-1-name">Name:</label></th><td><input id="id_form-1-name" type="text" name="form-1-name" value="Paul Verlaine" maxlength="100" /><input type="hidden" name="form-1-id" value="3" id="id_form-1-id" /></td></tr>
- <tr><th><label for="id_form-2-name">Name:</label></th><td><input id="id_form-2-name" type="text" name="form-2-name" value="Walt Whitman" maxlength="100" /><input type="hidden" name="form-2-id" value="2" id="id_form-2-id" /></td></tr>
- <tr><th><label for="id_form-3-name">Name:</label></th><td><input id="id_form-3-name" type="text" name="form-3-name" maxlength="100" /><input type="hidden" name="form-3-id" id="id_form-3-id" /></td></tr>
+ <tr><th><label for="id_form-0-name">Name:</label></th><td><input id="id_form-0-name" type="text" name="form-0-name" value="Charles Baudelaire" maxlength="100"><input type="hidden" name="form-0-id" value="1" id="id_form-0-id"></td></tr>
+ <tr><th><label for="id_form-1-name">Name:</label></th><td><input id="id_form-1-name" type="text" name="form-1-name" value="Paul Verlaine" maxlength="100"><input type="hidden" name="form-1-id" value="3" id="id_form-1-id"></td></tr>
+ <tr><th><label for="id_form-2-name">Name:</label></th><td><input id="id_form-2-name" type="text" name="form-2-name" value="Walt Whitman" maxlength="100"><input type="hidden" name="form-2-id" value="2" id="id_form-2-id"></td></tr>
+ <tr><th><label for="id_form-3-name">Name:</label></th><td><input id="id_form-3-name" type="text" name="form-3-name" maxlength="100"><input type="hidden" name="form-3-id" id="id_form-3-id"></td></tr>
A ``max_num`` value of ``None`` (the default) puts a high limit on the number
of forms displayed (1000). In practice this is equivalent to no limit.
diff --git a/docs/topics/i18n/timezones.txt b/docs/topics/i18n/timezones.txt
index 902dd7aa3a..eb97677777 100644
--- a/docs/topics/i18n/timezones.txt
+++ b/docs/topics/i18n/timezones.txt
@@ -204,7 +204,7 @@ Include a form in ``template.html`` that will ``POST`` to this view:
<option value="{{ tz }}"{% if tz == TIME_ZONE %} selected{% endif %}>{{ tz }}</option>
{% endfor %}
</select>
- <input type="submit" value="Set" />
+ <input type="submit" value="Set">
</form>
.. _time-zones-in-forms:
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 305f3a5839..5003bfb997 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -610,7 +610,7 @@ filters::
</h1>
<p>
{% for stage in tour_stages %}
- {% cycle start end %}: {{ stage }}{% if forloop.counter|divisibleby:2 %}<br />{% else %}, {% endif %}
+ {% cycle start end %}: {{ stage }}{% if forloop.counter|divisibleby:2 %}<br>{% else %}, {% endif %}
{% endfor %}
</p>
@@ -891,9 +891,9 @@ use the ``{% get_language_info %}`` tag::
You can then access the information::
- Language code: {{ lang.code }}<br />
- Name of language: {{ lang.name_local }}<br />
- Name in English: {{ lang.name }}<br />
+ Language code: {{ lang.code }}<br>
+ Name of language: {{ lang.name_local }}<br>
+ Name in English: {{ lang.name }}<br>
Bi-directional: {{ lang.bidi }}
Name in the active language: {{ lang.name_translated }}
@@ -1788,7 +1788,7 @@ Here's example HTML template code:
{% load i18n %}
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
- <input name="next" type="hidden" value="{{ redirect_to }}" />
+ <input name="next" type="hidden" value="{{ redirect_to }}">
<select name="language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
@@ -1799,7 +1799,7 @@ Here's example HTML template code:
</option>
{% endfor %}
</select>
- <input type="submit" value="Go" />
+ <input type="submit" value="Go">
</form>
In this example, Django looks up the URL of the page to which the user will be
diff --git a/docs/topics/pagination.txt b/docs/topics/pagination.txt
index 81efaafd28..80a6b66fc6 100644
--- a/docs/topics/pagination.txt
+++ b/docs/topics/pagination.txt
@@ -101,7 +101,7 @@ pages along with any interesting information from the objects themselves::
{% for contact in contacts %}
{# Each "contact" is a Contact model object. #}
- {{ contact.full_name|upper }}<br />
+ {{ contact.full_name|upper }}<br>
...
{% endfor %}
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index c7ae792fb5..d3be9e2124 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -1485,7 +1485,7 @@ your test suite.
self.assertHTMLEqual(
'<p>Hello <b>world!</p>',
'''<p>
- Hello <b>world! <b/>
+ Hello <b>world! </b>
</p>'''
)
self.assertHTMLEqual(