summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial07.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/intro/tutorial07.txt')
-rw-r--r--docs/intro/tutorial07.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/intro/tutorial07.txt b/docs/intro/tutorial07.txt
index f80b6fc6c3..f93ba18d99 100644
--- a/docs/intro/tutorial07.txt
+++ b/docs/intro/tutorial07.txt
@@ -24,7 +24,7 @@ Let's see how this works by reordering the fields on the edit form. Replace
the ``admin.site.register(Question)`` line with:
.. code-block:: python
- :caption: polls/admin.py
+ :caption: ``polls/admin.py``
from django.contrib import admin
@@ -53,7 +53,7 @@ And speaking of forms with dozens of fields, you might want to split the form
up into fieldsets:
.. code-block:: python
- :caption: polls/admin.py
+ :caption: ``polls/admin.py``
from django.contrib import admin
@@ -87,7 +87,7 @@ There are two ways to solve this problem. The first is to register ``Choice``
with the admin just as we did with ``Question``:
.. code-block:: python
- :caption: polls/admin.py
+ :caption: ``polls/admin.py``
from django.contrib import admin
@@ -121,7 +121,7 @@ Remove the ``register()`` call for the ``Choice`` model. Then, edit the ``Questi
registration code to read:
.. code-block:: python
- :caption: polls/admin.py
+ :caption: ``polls/admin.py``
from django.contrib import admin
@@ -168,7 +168,7 @@ tabular way of displaying inline related objects. To use it, change the
``ChoiceInline`` declaration to read:
.. code-block:: python
- :caption: polls/admin.py
+ :caption: ``polls/admin.py``
class ChoiceInline(admin.TabularInline):
#...
@@ -200,7 +200,7 @@ tuple of field names to display, as columns, on the change list page for the
object:
.. code-block:: python
- :caption: polls/admin.py
+ :caption: ``polls/admin.py``
class QuestionAdmin(admin.ModelAdmin):
# ...
@@ -210,7 +210,7 @@ For good measure, let's also include the ``was_published_recently()`` method
from :doc:`Tutorial 2 </intro/tutorial02>`:
.. code-block:: python
- :caption: polls/admin.py
+ :caption: ``polls/admin.py``
class QuestionAdmin(admin.ModelAdmin):
# ...
@@ -232,7 +232,7 @@ You can improve that by using the :func:`~django.contrib.admin.display`
decorator on that method (in :file:`polls/models.py`), as follows:
.. code-block:: python
- :caption: polls/models.py
+ :caption: ``polls/models.py``
from django.contrib import admin
@@ -310,7 +310,7 @@ Open your settings file (:file:`mysite/settings.py`, remember) and add a
:setting:`DIRS <TEMPLATES-DIRS>` option in the :setting:`TEMPLATES` setting:
.. code-block:: python
- :caption: mysite/settings.py
+ :caption: ``mysite/settings.py``
TEMPLATES = [
{