﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10292	AdminSite docs are incorrect	bugmenot	nobody	"http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adminsite-objects

could use some work.  The second paragraph, on subclassing AdminSite, should have a code example, since it is not the same as using the builtin admin.site.  You need to register with myadmin.register() instead of admin.site.register(); this is not obvious.  A short code snippet would make it obvious.

The first code example, registering the default admin site in the usual way, is next to useless in a section about how to do things outside of the usual way.  The second code example is just incorrect:


{{{
# urls.py
from django.conf.urls.defaults import *
from myproject.admin import admin_site

urlpatterns = patterns('',
    ('^myadmin/', include(admin_site.urls)),
)
}}}

should be:

{{{
# urls.py
from django.conf.urls.defaults import *
from myapp.admin import myadmin

urlpatterns = patterns('',
    ('^myadmin/',    include(myadmin.root)),
)
}}}

since the project itself doesn't have an admin.py, and presumably you're not making a whole new app just to administer itself.  AdminSite objects have no ""urls"" attribute, you want to register the ""root"" attribute.  And it would be much clearer if, as mentioned, you included a code snippet before that shows how to subclass AdminSite and register your objects with it.

The last code snippet on the page is also incorrect; ""urls"" should be ""root."""		closed	Documentation	1.0		invalid	AdminSite		Unreviewed	0	0	0	0	0	0
