summaryrefslogtreecommitdiff
path: root/docs/topics/forms
diff options
context:
space:
mode:
authorJoseph Victor Zammit <jvzammit@gmail.com>2023-01-23 21:29:05 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-02-28 12:54:33 +0100
commit5bdd6223a24b2bcd0ee32251d6f3ce20e934a1dd (patch)
tree3c9b132c5e77bdcde426764aa9fddecaf90ae2af /docs/topics/forms
parentfae76b81ce6d13245abc42752f0a82f16a9ba35f (diff)
[4.2.x] Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
Backport of ba755ca13123d2691a0926ddb64e5d0a2906a880 from main
Diffstat (limited to 'docs/topics/forms')
-rw-r--r--docs/topics/forms/media.txt4
-rw-r--r--docs/topics/forms/modelforms.txt4
2 files changed, 5 insertions, 3 deletions
diff --git a/docs/topics/forms/media.txt b/docs/topics/forms/media.txt
index 750f7daa5e..0ff37f4ba0 100644
--- a/docs/topics/forms/media.txt
+++ b/docs/topics/forms/media.txt
@@ -111,7 +111,7 @@ requirements::
css = {
'screen': ['pretty.css'],
'tv,projector': ['lo_res.css'],
- 'print': ['newspaper.css],
+ 'print': ['newspaper.css'],
}
If this last CSS definition were to be rendered, it would become the following HTML:
@@ -287,7 +287,7 @@ outputting the complete HTML ``<script>`` or ``<link>`` tag content:
>>> from django.utils.html import html_safe
>>>
>>> @html_safe
- >>> class JSPath:
+ ... class JSPath:
... def __str__(self):
... return '<script src="https://example.org/asset.js" rel="stylesheet">'
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index 9ef7ee3f68..1b8f1bffb0 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -778,7 +778,9 @@ keyword arguments, or the corresponding attributes on the ``ModelForm`` inner
``Meta`` class. Please see the ``ModelForm`` :ref:`modelforms-selecting-fields`
documentation.
-... or enable localization for specific fields::
+... or enable localization for specific fields:
+
+.. code-block:: pycon
>>> Form = modelform_factory(Author, form=AuthorForm, localized_fields=["birth_date"])