Changeset 3359
- Timestamp:
- 07/18/06 20:35:58 (2 years ago)
- Files:
-
- django/trunk/docs/tutorial03.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/tutorial03.txt
r3356 r3359 190 190 191 191 def index(request): 192 latest_poll_list = Poll.objects.all().order_by('-pub_date') 192 latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5] 193 193 output = ', '.join([p.question for p in latest_poll_list]) 194 194 return HttpResponse(output) … … 203 203 204 204 def index(request): 205 latest_poll_list = Poll.objects.all().order_by('-pub_date') 205 latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5] 206 206 t = loader.get_template('polls/index.html') 207 207 c = Context({
