Browse files

Cleaned up some documentation about admin URLs in Django 1.1. Thanks,…

… Alex Gaynor.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 1aac357 commit 4cf1327aa4bc765ba3ed9df32f48bef5e936ebef @jacobian jacobian committed Feb 24, 2009
Showing with 11 additions and 14 deletions.
  1. +3 −0 docs/intro/tutorial02.txt
  2. +8 −14 docs/ref/contrib/admin.txt
@@ -40,6 +40,9 @@ activate the admin site for your installation, do these three things:
know is that it maps URL roots to applications. In the end, you should
have a ```` file that looks like this:
+ .. versionchanged:: 1.1
+ The method for adding admin urls has changed in Django 1.1.
.. parsed-literal::
from django.conf.urls.defaults import *
@@ -676,6 +676,8 @@ model instance::
+.. versionadded:: 1.1
The ``get_urls`` method on a ``ModelAdmin`` returns the URLs to be used for
that ModelAdmin in the same way as a URLconf. Therefore you can extend them as
documented in :ref:`topics-http-urls`::
@@ -1157,6 +1159,10 @@ It's easy to create multiple instances of the admin site on the same
Django-powered Web site. Just create multiple instances of ``AdminSite`` and
root each one at a different URL.
+.. versionchanged:: 1.1
+ The method for hooking ``AdminSite`` instances into urls has changed in
+ Django 1.1.
In this example, the URLs ``/basic-admin/`` and ``/advanced-admin/`` feature
separate versions of the admin site -- using the ``AdminSite`` instances
``myproject.admin.basic_site`` and ``myproject.admin.advanced_site``,
@@ -1174,22 +1180,10 @@ respectively::
Adding views to admin sites
+.. versionadded:: 1.1
It possible to add additional views to the admin site in the same way one can
add them to ``ModelAdmins``. This by using the ``get_urls()`` method on an
AdminSite in the same way as `described above`__
__ `get_urls(self)`_
-Protecting Custom ``AdminSite`` and ``ModelAdmin``
-By default all the views in the Django admin are protected so that only staff
-members can access them. If you add your own views to either a ``ModelAdmin``
-or ``AdminSite`` you should ensure that where necessary they are protected in
-the same manner. To do this use the ``admin_perm_test`` decorator provided in
-``django.contrib.admin.utils.admin_perm_test``. It can be used in the same way
-as the ``login_required`` decorator.
-.. note::
- The ``admin_perm_test`` decorator can only be used on methods which are on
- ``ModelAdmins`` or ``AdminSites``, you cannot use it on arbitrary functions.

0 comments on commit 4cf1327

Please sign in to comment.