Hello,
I have been following along the Django tutorial, and as I was editing
the urlpatterns in my urls module, i got the following error
when I tried to run the mysite server:
AttributeError at /
'AdminSite' object has no attribute 'urls'
Request Method: GET
Request URL: http://127.0.0.1:8000/
Exception Type: AttributeError
the line that error references is in my urls.py file, line 13:
>>>from django.conf.urls.defaults import *
>>>># Uncomment the next two lines to enable the admin:
>>>>from django.contrib import admin
>>>>admin.autodiscover()
>>>>urlpatterns = patterns('',
>>>> # (r'^mysite/', include('mysite.foo.urls')),
(r'^polls/$', 'mysite.polls.views.index'),
(r'^polls/(?P<poll_id>\d+)/$',
'mysite.polls.views.detail'),
(r'^polls/(?P<poll_id>\d+)/results/$',
'mysite.polls.views.results'),
(r'^polls/(?P<poll_id>\d+)/vote/$',
'mysite.polls.views.vote'),
(r'^admin/', include(admin.site.urls)), #FIXME: this
is the error.
>>>>)
however, line13 is exactly as written in part 3 of the official Django
tutorial.
Any suggestions?
Thanks
Ryan.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---