mirror of https://github.com/django/django.git
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:
parent
3739f89b44
commit
5fadeb848c
|
@ -235,15 +235,11 @@ Change it like so::
|
|||
from django.views.generic import DetailView, ListView
|
||||
from polls.models import Poll
|
||||
|
||||
info_dict = {
|
||||
'queryset': Poll.objects.all(),
|
||||
}
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^$',
|
||||
ListView.as_view(
|
||||
models=Poll,
|
||||
context_object_name='latest_poll_list'
|
||||
context_object_name='latest_poll_list',
|
||||
template_name='polls/index.html')),
|
||||
(r'^(?P<pk>\d+)/$',
|
||||
DetailView.as_view(
|
||||
|
|
Loading…
Reference in New Issue