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:21:37 +0100
commitba755ca13123d2691a0926ddb64e5d0a2906a880 (patch)
tree283bacaa7d29dc42466000ef18ece04e854d50a4 /docs/topics/forms
parentc67ea79aa981ae82595d89f8018a41fcd842e7c9 (diff)
Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
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 61a2b93daa..ab37a19182 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:
@@ -280,7 +280,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 be871fd4b0..50fb12ef6e 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"])