Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… Alex Gaynor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4cf1327aa4bc765ba3ed9df32f48bef5e936ebef 1 parent 1aac357
@jacobian jacobian authored
Showing with 11 additions and 14 deletions.
  1. +3 −0  docs/intro/tutorial02.txt
  2. +8 −14 docs/ref/contrib/admin.txt
View
3  docs/intro/tutorial02.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 ``urls.py`` 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 *
View
22 docs/ref/contrib/admin.txt
@@ -676,6 +676,8 @@ model instance::
``get_urls(self)``
~~~~~~~~~~~~~~~~~~~
+.. 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.
Please sign in to comment.
Something went wrong with that request. Please try again.