summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-08-13 15:23:21 -0400
committerTim Graham <timograham@gmail.com>2014-08-14 09:05:51 -0400
commitcf79b57ad09c145b82ccaab798d88958316027cf (patch)
tree5d94889b76ce1eb9d9972ae7e4a2414dd689cda8
parent055d95fce0668e11f2dae48d2439f378349d2524 (diff)
Fixed #21132 -- Removed the useless app_name argument to AdminSite.
Thanks MarkusH for the report and Florian for review.
-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