diff --git a/AUTHORS b/AUTHORS index d640706ec9..b4abfcf9cc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -149,6 +149,7 @@ answer newbie questions, and generally made Django that much better: pgross@thoughtworks.com phaedo phil@produxion.net + phil.h.smith@gmail.com Gustavo Picon Luke Plant plisk diff --git a/django/db/models/base.py b/django/db/models/base.py index 5436d80a0e..ff99fd8b46 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -22,8 +22,8 @@ class ModelBase(type): "Metaclass for all models" def __new__(cls, name, bases, attrs): # If this isn't a subclass of Model, don't do anything special. - if not bases or bases == (object,): - return type.__new__(cls, name, bases, attrs) + if name == 'Model' or not filter(lambda b: issubclass(b, Model), bases): + return super(ModelBase, cls).__new__(cls, name, bases, attrs) # Create the class. new_class = type.__new__(cls, name, bases, {'__module__': attrs.pop('__module__')})