summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/admin/sites.py5
-rw-r--r--docs/releases/1.8.txt5
2 files changed, 7 insertions, 3 deletions
diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py
index 666f1da1fc..fb9840c8ca 100644
--- a/django/contrib/admin/sites.py
+++ b/django/contrib/admin/sites.py
@@ -49,10 +49,9 @@ class AdminSite(object):
password_change_template = None
password_change_done_template = None
- def __init__(self, name='admin', app_name='admin'):
+ def __init__(self, name='admin'):
self._registry = {} # model_class class -> admin_class instance
self.name = name
- self.app_name = app_name
self._actions = {'delete_selected': actions.delete_selected}
self._global_actions = self._actions.copy()
@@ -263,7 +262,7 @@ class AdminSite(object):
@property
def urls(self):
- return self.get_urls(), self.app_name, self.name
+ return self.get_urls(), 'admin', self.name
def each_context(self):
"""
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 6569a2c447..5979d79d1d 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -492,6 +492,11 @@ Miscellaneous
``'username'``, using the the ``'unique'`` key in its
:attr:`~django.forms.Field.error_messages` argument.
+* ``AdminSite`` no longer takes an ``app_name`` argument and its ``app_name``
+ attribute has been removed. The application name is always ``admin`` (as
+ opposed to the instance name which you can still customize using
+ ``AdminSite(name="...")``.
+
.. _deprecated-features-1.8:
Features deprecated in 1.8