Fixed #21132 -- Removed the useless app_name argument to AdminSite.

Thanks MarkusH for the report and Florian for review.
This commit is contained in:
Tim Graham 2014-08-13 15:23:21 -04:00
parent 055d95fce0
commit cf79b57ad0
2 changed files with 7 additions and 3 deletions

View File

@ -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):
"""

View File

@ -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