diff options
| author | Curtis Maloney <curtis@tinbrain.net> | 2018-09-11 03:00:34 +1000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-09-10 14:38:08 -0400 |
| commit | 1853e2dbf2e290ec04e3389d523bbe4bad94a42e (patch) | |
| tree | c63e2721c7e691ae88a4ad9e5135b1f042bab857 /docs/intro/tutorial01.txt | |
| parent | 2b2474b75d63fcded37b872fcd2bb543d7502a8a (diff) | |
[2.1.x] Refs #20910 -- Replaced snippet directive with code-block.
Backport of c49ea6f5911296dcb40190c905e38b43cdc7c7a3 from master
Diffstat (limited to 'docs/intro/tutorial01.txt')
| -rw-r--r-- | docs/intro/tutorial01.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index aca496580e..d3d2fe3325 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -243,8 +243,8 @@ Write your first view Let's write the first view. Open the file ``polls/views.py`` and put the following Python code in it: -.. snippet:: - :filename: polls/views.py +.. code-block:: python + :caption: polls/views.py from django.http import HttpResponse @@ -271,8 +271,8 @@ Your app directory should now look like:: In the ``polls/urls.py`` file include the following code: -.. snippet:: - :filename: polls/urls.py +.. code-block:: python + :caption: polls/urls.py from django.urls import path @@ -286,8 +286,8 @@ The next step is to point the root URLconf at the ``polls.urls`` module. In ``mysite/urls.py``, add an import for ``django.urls.include`` and insert an :func:`~django.urls.include` in the ``urlpatterns`` list, so you have: -.. snippet:: - :filename: mysite/urls.py +.. code-block:: python + :caption: mysite/urls.py from django.contrib import admin from django.urls import include, path |
