Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #2355 -- Corrected a couple of small typos in code examples in …

…tutorial03.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 533594d1a5a943ef80360762d5c5d021975a9bde 1 parent c6cbfb3
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/tutorial03.txt
View
4 docs/tutorial03.txt
@@ -189,7 +189,7 @@ publication date::
from django.http import HttpResponse
def index(request):
- latest_poll_list = Poll.objects.all().order_by('-pub_date')
+ latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
output = ', '.join([p.question for p in latest_poll_list])
return HttpResponse(output)
@@ -202,7 +202,7 @@ So let's use Django's template system to separate the design from Python::
from django.http import HttpResponse
def index(request):
- latest_poll_list = Poll.objects.all().order_by('-pub_date')
+ latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
t = loader.get_template('polls/index.html')
c = Context({
'latest_poll_list': latest_poll_list,
Please sign in to comment.
Something went wrong with that request. Please try again.