From 1853e2dbf2e290ec04e3389d523bbe4bad94a42e Mon Sep 17 00:00:00 2001 From: Curtis Maloney Date: Tue, 11 Sep 2018 03:00:34 +1000 Subject: [2.1.x] Refs #20910 -- Replaced snippet directive with code-block. Backport of c49ea6f5911296dcb40190c905e38b43cdc7c7a3 from master --- docs/intro/tutorial01.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/intro/tutorial01.txt') 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 -- cgit v1.3