@@ -26,7 +26,7 @@ representing your models -- so far, it's been solving many years' worth of
2626database-schema problems. Here's a quick example:
2727
2828.. code-block:: python
29- :caption: mysite/news/models.py
29+ :caption: `` mysite/news/models.py``
3030
3131 from django.db import models
3232
@@ -146,7 +146,7 @@ a website that lets authenticated users add, change and delete objects. The
146146only step required is to register your model in the admin site:
147147
148148.. code-block:: python
149- :caption: mysite/news/models.py
149+ :caption: `` mysite/news/models.py``
150150
151151 from django.db import models
152152
@@ -157,7 +157,7 @@ only step required is to register your model in the admin site:
157157 reporter = models.ForeignKey(Reporter, on_delete=models.CASCADE)
158158
159159.. code-block:: python
160- :caption: mysite/news/admin.py
160+ :caption: `` mysite/news/admin.py``
161161
162162 from django.contrib import admin
163163
@@ -189,7 +189,7 @@ Here's what a URLconf might look like for the ``Reporter``/``Article``
189189example above:
190190
191191.. code-block:: python
192- :caption: mysite/news/urls.py
192+ :caption: `` mysite/news/urls.py``
193193
194194 from django.urls import path
195195
@@ -229,7 +229,7 @@ and renders the template with the retrieved data. Here's an example view for
229229``year_archive`` from above:
230230
231231.. code-block:: python
232- :caption: mysite/news/views.py
232+ :caption: `` mysite/news/views.py``
233233
234234 from django.shortcuts import render
235235
@@ -258,7 +258,7 @@ Let's say the ``news/year_archive.html`` template was found. Here's what that
258258might look like:
259259
260260.. code-block:: html+django
261- :caption: mysite/news/templates/news/year_archive.html
261+ :caption: `` mysite/news/templates/news/year_archive.html``
262262
263263 {% extends "base.html" %}
264264
@@ -299,7 +299,7 @@ Here's what the "base.html" template, including the use of :doc:`static files
299299</howto/static-files/index>`, might look like:
300300
301301.. code-block:: html+django
302- :caption: mysite/templates/base.html
302+ :caption: `` mysite/templates/base.html``
303303
304304 {% load static %}
305305 <html>
0 commit comments