summaryrefslogtreecommitdiff
path: root/django/db/models/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/base.py')
-rw-r--r--django/db/models/base.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 757f2378ce..e2ba49ee8c 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -15,7 +15,7 @@ from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned,
from django.db.models.fields import AutoField, ImageField, FieldDoesNotExist
from django.db.models.fields.related import OneToOneRel, ManyToOneRel, OneToOneField
from django.db.models.query import delete_objects, Q, CollectedObjects
-from django.db.models.options import Options, AdminOptions
+from django.db.models.options import Options
from django.db import connection, transaction
from django.db.models import signals
from django.db.models.loading import register_models, get_model
@@ -137,9 +137,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: