Fixed #14494 -- Cleanup and typo in tutorial 4, introduced by class-based view changes. Thanks to Andrews Medina for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-10-19 04:03:07 +00:00
parent 3739f89b44
commit 5fadeb848c
1 changed files with 1 additions and 5 deletions

View File

@ -235,15 +235,11 @@ Change it like so::
from django.views.generic import DetailView, ListView from django.views.generic import DetailView, ListView
from polls.models import Poll from polls.models import Poll
info_dict = {
'queryset': Poll.objects.all(),
}
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^$', (r'^$',
ListView.as_view( ListView.as_view(
models=Poll, models=Poll,
context_object_name='latest_poll_list' context_object_name='latest_poll_list',
template_name='polls/index.html')), template_name='polls/index.html')),
(r'^(?P<pk>\d+)/$', (r'^(?P<pk>\d+)/$',
DetailView.as_view( DetailView.as_view(