mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
newforms-admin: Fixed #6614. Removed some code related to old Admin classes. Thanks, Brian Rosner.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7c1242a7a3
commit
397199c577
@ -82,9 +82,6 @@ class ModelBase(type):
|
||||
return get_model(new_class._meta.app_label, name, False)
|
||||
|
||||
def add_to_class(cls, name, value):
|
||||
if name == 'Admin':
|
||||
assert type(value) == types.ClassType, "%r attribute of %s model must be a class, not a %s object" % (name, cls.__name__, type(value))
|
||||
value = AdminOptions(**dict([(k, v) for k, v in value.__dict__.items() if not k.startswith('_')]))
|
||||
if hasattr(value, 'contribute_to_class'):
|
||||
value.contribute_to_class(cls, name)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user