Simplified AdminSite self.name attribute initialization.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ramiro Morales 2011-07-30 19:22:43 +00:00
parent ff9a666753
commit f90449321b
1 changed files with 2 additions and 5 deletions

View File

@ -39,12 +39,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=None, app_name='admin'): def __init__(self, name='admin', app_name='admin'):
self._registry = {} # model_class class -> admin_class instance self._registry = {} # model_class class -> admin_class instance
if name is None: self.name = name
self.name = 'admin'
else:
self.name = name
self.app_name = app_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()