Kaydet (Commit) 533594d1 authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

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
üst c6cbfb3d
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment