From 6f006f40f78649c20c72c75c8159e164de9c7b6c Mon Sep 17 00:00:00 2001
From: Tim Graham <timograham@gmail.com>
Date: Mon, 22 Aug 2016 19:22:04 -0400
Subject: [PATCH] [1.10.x] Fixed #27104 -- Corrected shell example in tutorial
 5.

Backport of cf2cd4053fe3eed50ab2b7269ed72d25712c970a from master
---
 docs/intro/tutorial05.txt | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt
index 3f56166ed4..438cb20045 100644
--- a/docs/intro/tutorial05.txt
+++ b/docs/intro/tutorial05.txt
@@ -343,7 +343,9 @@ which will allow us to examine some additional attributes on responses such as
 ``response.context`` that otherwise wouldn't be available. Note that this
 method *does not* setup a test database, so the following will be run against
 the existing database and the output may differ slightly depending on what
-questions you already created.
+questions you already created. You might get unexpected results if your
+``TIME_ZONE`` in ``settings.py`` isn't correct. If you don't remember setting
+it earlier, check it before continuing.
 
 Next we need to import the test client class (later in ``tests.py`` we will use
 the :class:`django.test.TestCase` class, which comes with its own client, so
@@ -367,23 +369,11 @@ With that ready, we can ask the client to do some work for us::
     >>> response.status_code
     200
     >>> response.content
-    b'\n\n\n    <p>No polls are available.</p>\n\n'
-    >>> # note - you might get unexpected results if your ``TIME_ZONE``
-    >>> # in ``settings.py`` is not correct. If you need to change it,
-    >>> # you will also need to restart your shell session
-    >>> from polls.models import Question
-    >>> from django.utils import timezone
-    >>> # create a Question and save it
-    >>> q = Question(question_text="Who is your favorite Beatle?", pub_date=timezone.now())
-    >>> q.save()
-    >>> # check the response once again
-    >>> response = client.get('/polls/')
-    >>> response.content
-    b'\n\n\n    <ul>\n    \n        <li><a href="/polls/1/">Who is your favorite Beatle?</a></li>\n    \n    </ul>\n\n'
+    b'\n    <ul>\n    \n        <li><a href="/polls/1/">What&#39;s up?</a></li>\n    \n    </ul>\n\n'
     >>> # If the following doesn't work, you probably omitted the call to
     >>> # setup_test_environment() described above
     >>> response.context['latest_question_list']
-    <QuerySet [<Question: Who is your favorite Beatle?>]>
+    <QuerySet [<Question: What's up?>]>
 
 Improving our view
 ------------------