Ticket #14494: tutorial04.patch
File tutorial04.patch, 718 bytes (added by , 14 years ago) |
---|
-
docs/intro/tutorial04.txt
235 235 from django.views.generic import DetailView, ListView 236 236 from polls.models import Poll 237 237 238 info_dict = {239 'queryset': Poll.objects.all(),240 }241 242 238 urlpatterns = patterns('', 243 239 (r'^$', 244 240 ListView.as_view( 245 241 models=Poll, 246 context_object_name='latest_poll_list' 242 context_object_name='latest_poll_list', 247 243 template_name='polls/index.html')), 248 244 (r'^(?P<pk>\d+)/$', 249 245 DetailView.as_view(