Fixed #3282 -- Fixed incorrect statement in docs/tutorial03.txt. Thanks, dave.pawson@gmail.com and Simon G.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-01-23 02:02:35 +00:00
parent 9afddbe422
commit 31bdd8d720
1 changed files with 1 additions and 2 deletions

View File

@ -260,8 +260,7 @@ provides a shortcut. Here's the full ``index()`` view, rewritten::
latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5] latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list}) return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list})
Note that we no longer need to import ``loader``, ``Context`` or Note that once we've done this in all these views, we no longer need to import ``loader``, ``Context`` and ``HttpResponse``.
``HttpResponse``.
The ``render_to_response()`` function takes a template name as its first The ``render_to_response()`` function takes a template name as its first
argument and a dictionary as its optional second argument. It returns an argument and a dictionary as its optional second argument. It returns an