diff options
Diffstat (limited to 'docs/intro')
| -rw-r--r-- | docs/intro/overview.txt | 2 | ||||
| -rw-r--r-- | docs/intro/tutorial02.txt | 4 | ||||
| -rw-r--r-- | docs/intro/tutorial04.txt | 4 | ||||
| -rw-r--r-- | docs/intro/tutorial05.txt | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/docs/intro/overview.txt b/docs/intro/overview.txt index 203e501054..07999f19a4 100644 --- a/docs/intro/overview.txt +++ b/docs/intro/overview.txt @@ -69,7 +69,7 @@ necessary: .. code-block:: python # Import the models we created from our "news" app - >>> from news.models import Reporter, Article + >>> from news.models import Article, Reporter # No reporters are in the system yet. >>> Reporter.objects.all() diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt index e9b2aaa2a3..6387e1e5fe 100644 --- a/docs/intro/tutorial02.txt +++ b/docs/intro/tutorial02.txt @@ -383,7 +383,7 @@ the Python import path to your :file:`mysite/settings.py` file. Once you're in the shell, explore the :doc:`database API </topics/db/queries>`:: - >>> from polls.models import Question, Choice # Import the model classes we just wrote. + >>> from polls.models import Choice, Question # Import the model classes we just wrote. # No questions are in the system yet. >>> Question.objects.all() @@ -469,7 +469,7 @@ the :doc:`time zone support docs </topics/i18n/timezones>`. Save these changes and start a new Python interactive shell by running ``python manage.py shell`` again:: - >>> from polls.models import Question, Choice + >>> from polls.models import Choice, Question # Make sure our __str__() addition worked. >>> Question.objects.all() diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt index 6f685fc402..2b5858d8de 100644 --- a/docs/intro/tutorial04.txt +++ b/docs/intro/tutorial04.txt @@ -69,8 +69,8 @@ create a real version. Add the following to ``polls/views.py``: .. snippet:: :filename: polls/views.py + from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render - from django.http import HttpResponseRedirect, HttpResponse from django.urls import reverse from .models import Choice, Question @@ -262,8 +262,8 @@ views and use Django's generic views instead. To do so, open the .. snippet:: :filename: polls/views.py - from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect + from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.views import generic diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt index 88901cd5c1..91add18e1d 100644 --- a/docs/intro/tutorial05.txt +++ b/docs/intro/tutorial05.txt @@ -165,8 +165,8 @@ Put the following in the ``tests.py`` file in the ``polls`` application: import datetime - from django.utils import timezone from django.test import TestCase + from django.utils import timezone from .models import Question |
