Ticket #3282: 3282.diff
File 3282.diff, 710 bytes (added by , 18 years ago) |
---|
-
tutorial03.txt
260 260 latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5] 261 261 return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list}) 262 262 263 Note that we no longer need to import ``loader``, ``Context`` or 264 ``HttpResponse``. 263 Note that once we've done this in all these views, we no longer need to import ``loader``, ``Context`` and ``HttpResponse``. 265 264 266 265 The ``render_to_response()`` function takes a template name as its first 267 266 argument and a dictionary as its optional second argument. It returns an