I am doing the Django tutorial. I have got everything to work up to the
point in Part 4, where I replace:

from django.conf.urls.defaults import *
urlpatterns = patterns('mysite.polls.views',
    (r'^$', 'index'),
    (r'^(?P<poll_id>\d+)/$', 'detail'),
    (r'^(?P<poll_id>\d+)/results/$', 'results'),
    (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
)

in polls/url.py, with:

from django.conf.urls.defaults import *
from mysite.polls.models import Poll
info_dict = {
    'queryset': Poll.objects.all(),
}
urlpatterns = patterns('',
    (r'^$', 'django.views.generic.list_detail.object_list', info_dict),
    (r'^(?P<object_id>\d+)/$', '
django.views.generic.list_detail.object_detail', info_dict),
    (r'^(?P<object_id>\d+)/results/$', '
django.views.generic.list_detail.object_detail', dict(info_dict,
template_name='polls/results.html'), 'poll_results'),
    (r'^(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),)

when I get the following error message:

TypeError at /polls/
__init__() takes at most 4 arguments (5 given)
Request Method:     GET
Request URL:     http://localhost:8080/polls/
Exception Type:     TypeError
Exception Value:     __init__() takes at most 4 arguments (5 given)
Exception Location:
/usr/lib/python2.5/site-packages/django/conf/urls/defaults.py in patterns,
line 18

Any suggestions?

Thanks
Jim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to