Opened 8 years ago

Closed 8 years ago

#13258 closed (wontfix)

Writing your first Django app, part 4,

Reported by: julyzergcn1@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


maybe the should be like this at last.

from django.conf.urls.defaults import *
from mysite.polls.models import Poll

info_dict = {
    'queryset': Poll.objects.all(),

urlpatterns = patterns('',
    url(r'^$', 'django.views.generic.list_detail.object_list', dict(info_dict, template_object_name='latest_poll', template_name='polls/index.html')),
    url(r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_object_name='poll', template_name='polls/detail.html')),
    url(r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_object_name='poll', template_name='polls/results.html'), 'poll_results'),
    (r'^(?P<poll_id>\d+)/vote/$', ''),

Change History (1)

comment:1 Changed 8 years ago by Russell Keith-Magee

milestone: 1.2
Resolution: wontfix
Status: newclosed

The existing example is correct, it is significantly simpler, and it highlights some important consistency issues introduced by the use of generic views.

Given that this ticket doesn't contain any description of *why* these changes are required, I'm closing wontfix.

Note: See TracTickets for help on using tickets.
Back to Top