@@ -78,8 +78,8 @@ Make the poll app modifiable in the admin
78
78
But where's our poll app? It's not displayed on the admin index page.
79
79
80
80
Just one thing to do: we need to tell the admin that ``Poll``
81
- objects have an admin interface. To do this, open the file called
82
- ``admin.py`` in your ``polls`` directory , and edit it to look like this::
81
+ objects have an admin interface. To do this, open the : file:`polls/admin.py`
82
+ file , and edit it to look like this::
83
83
84
84
from django.contrib import admin
85
85
from polls.models import Poll
@@ -339,7 +339,7 @@ of an arbitrary method is not supported. Also note that the column header for
339
339
underscores replaced with spaces), and that each line contains the string
340
340
representation of the output.
341
341
342
- You can improve that by giving that method (in `` models.py` `) a few
342
+ You can improve that by giving that method (in :file:`polls/ models.py`) a few
343
343
attributes, as follows::
344
344
345
345
class Poll(models.Model):
@@ -350,8 +350,8 @@ attributes, as follows::
350
350
was_published_recently.boolean = True
351
351
was_published_recently.short_description = 'Published recently?'
352
352
353
- Edit your admin.py file again and add an improvement to the Poll change list page: Filters. Add the
354
- following line to ``PollAdmin``::
353
+ Edit your :file:`polls/ admin.py` file again and add an improvement to the Poll
354
+ change list page: Filters. Add the following line to ``PollAdmin``::
355
355
356
356
list_filter = ['pub_date']
357
357
@@ -409,7 +409,7 @@ live anywhere on your filesystem that Django can access. (Django runs as
409
409
whatever user your server runs.) However, keeping your templates within the
410
410
project is a good convention to follow.
411
411
412
- Open your settings file (`` mysite/settings.py`` , remember) and add a
412
+ Open your settings file (:file:` mysite/settings.py`, remember) and add a
413
413
:setting:`TEMPLATE_DIRS` setting::
414
414
415
415
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
0 commit comments