diff options
| author | Tim Graham <timograham@gmail.com> | 2017-04-11 08:30:55 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-04-12 08:46:05 -0400 |
| commit | c30cc8d2221a5c803c17c7417182dfbb9e1dde17 (patch) | |
| tree | b5f66604a55fe300a81cf1a9c87785f7e7892383 /docs | |
| parent | b888fdf79cd3ce95a83dc07826223a0f3383e747 (diff) | |
[1.11.x] Fixed #28069 -- Moved setup_test_environment() warning in tutorial 5.
Updated for 17e661641ddaf8266e7430d83cfb2039abc55df7.
Backport of 45d65fc3f21d00ff619820c004b612f5c2fa1713 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/intro/tutorial05.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt index c6e2827b6b..45a11a68c0 100644 --- a/docs/intro/tutorial05.txt +++ b/docs/intro/tutorial05.txt @@ -361,7 +361,9 @@ With that ready, we can ask the client to do some work for us:: >>> # get a response from '/' >>> response = client.get('/') - >>> # we should expect a 404 from that address + >>> # we should expect a 404 from that address; if you instead see an + >>> # "Invalid HTTP_HOST header" error and a 400 response, you probably + >>> # omitted the setup_test_environment() call described earlier. >>> response.status_code 404 >>> # on the other hand we should expect to find something at '/polls/' @@ -372,8 +374,6 @@ With that ready, we can ask the client to do some work for us:: 200 >>> response.content b'\n <ul>\n \n <li><a href="/polls/1/">What'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: What's up?>]> |
