Both Gabriel and Antti have it the wrong way round, unfortunately.
admin.site.root
is the version 1.0 behaviour. If you have downloaded 1.0 or 1.0.2, that's what you should use.
However, there were some changes to the URL handling for Django's admin very recently, which are part of the yet-to-be-released 1.1. These are primarily to make it possible to use the reverse() function to look up admin URLs. So if you have a recent checkout of the code, you'll need to use admin.site.urls
.
Your link is to the second edition of the Django Book, which is being updated for version 1.1 - and the docs which Gabriel refers to are also for the current checkout, which has the new version.
(Just for completeness, I'd note that versions of Django before newforms-admin was merged, prior to 1.0, used admin.urls
, not admin.site.urls
or admin.site.root
.)