mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fixed #21132 -- Removed the useless app_name argument to AdminSite.
Thanks MarkusH for the report and Florian for review.
This commit is contained in:
parent
055d95fce0
commit
cf79b57ad0
@ -49,10 +49,9 @@ class AdminSite(object):
|
|||||||
password_change_template = None
|
password_change_template = None
|
||||||
password_change_done_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._registry = {} # model_class class -> admin_class instance
|
||||||
self.name = name
|
self.name = name
|
||||||
self.app_name = app_name
|
|
||||||
self._actions = {'delete_selected': actions.delete_selected}
|
self._actions = {'delete_selected': actions.delete_selected}
|
||||||
self._global_actions = self._actions.copy()
|
self._global_actions = self._actions.copy()
|
||||||
|
|
||||||
@ -263,7 +262,7 @@ class AdminSite(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def urls(self):
|
def urls(self):
|
||||||
return self.get_urls(), self.app_name, self.name
|
return self.get_urls(), 'admin', self.name
|
||||||
|
|
||||||
def each_context(self):
|
def each_context(self):
|
||||||
"""
|
"""
|
||||||
|
@ -492,6 +492,11 @@ Miscellaneous
|
|||||||
``'username'``, using the the ``'unique'`` key in its
|
``'username'``, using the the ``'unique'`` key in its
|
||||||
:attr:`~django.forms.Field.error_messages` argument.
|
: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:
|
.. _deprecated-features-1.8:
|
||||||
|
|
||||||
Features deprecated in 1.8
|
Features deprecated in 1.8
|
||||||
|
Loading…
Reference in New Issue
Block a user