#10050: Documentation bug in tutorial / admin manual? 'AdminSite' object has no
attribute 'urls'
---------------------------------+------------------------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: Documentation | Version: 1.0
Keywords: AdminSite urlconf | Stage: Unreviewed
Has_patch: 0 |
---------------------------------+------------------------------------------
This is with the released Django 1.0.2
On the tutorial page 2, you have the code snippet (for setting up URLConfs
for the admin site):
{{{
urlpatterns = patterns('',
# Example:
# (r'^mysite/', include('mysite.foo.urls')),
# Uncomment the admin/doc line below and add
'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
}}}
Yet '''admin.site.urls''' does not exist, so django produces an error page
instead of the admin site login.
In the (startproject) auto-generated '''urls.py''', there is:
{{{
urlpatterns = patterns('',
# Example:
# (r'^mysite/', include('mysite.foo.urls')),
# Uncomment the admin/doc line below and add
'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/(.*)', admin.site.root),
)
}}}
which works as expected.
The same bug is repeated in the admin site documentation at
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adminsite-objects
Thanks for all your great work, I *heart* Django.
cheers,
dustin.
--
Ticket URL: <http://code.djangoproject.com/ticket/10050>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---