summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-07-19 01:35:58 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-07-19 01:35:58 +0000
commit533594d1a5a943ef80360762d5c5d021975a9bde (patch)
treea844de36232db23623f44b6346b78a0c8e7a45ec /docs
parentc6cbfb3d7c4280ebc058f136c333d7f4db098b69 (diff)
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
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorial03.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/tutorial03.txt b/docs/tutorial03.txt
index 86b2e95ada..248d234043 100644
--- a/docs/tutorial03.txt
+++ b/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,