summaryrefslogtreecommitdiff
path: root/docs/topics/forms
diff options
context:
space:
mode:
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"])