mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
newforms-admin: Added missing 'self's to AdminSite class
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
77bdc85845
commit
a9fafd521f
@ -11,7 +11,7 @@ class AdminSite(object):
|
||||
def __init__(self):
|
||||
self._registry = {} # model_class -> admin_class
|
||||
|
||||
def register(model_or_iterable, admin_class=None, **options):
|
||||
def register(self, model_or_iterable, admin_class=None, **options):
|
||||
"""
|
||||
Registers the given model(s) with the given admin class.
|
||||
|
||||
@ -30,7 +30,7 @@ class AdminSite(object):
|
||||
raise AlreadyRegistered('The model %s is already registered' % model.__class__.__name__)
|
||||
self._registry[model] = admin_class
|
||||
|
||||
def unregister(model_or_iterable):
|
||||
def unregister(self, model_or_iterable):
|
||||
if issubclass(model_or_iterable, Model):
|
||||
model_or_iterable = [model_or_iterable]
|
||||
for model in model_or_iterable:
|
||||
|
Loading…
x
Reference in New Issue
Block a user