Browse files

Tweaked [7098] to follow a more duck-typing approach.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 1159791 commit 16928a79e6c6e8b496a999ee3a1e92dbf655c5aa @malcolmt malcolmt committed Feb 15, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/db/models/base.py
View
4 django/db/models/base.py
@@ -41,7 +41,9 @@ def __new__(cls, name, bases, attrs):
# Build complete list of parents
for base in parents:
- if base is not Model:
+ # Things without _meta aren't functional models, so they're
+ # uninteresting parents.
+ if hasattr(base, '_meta'):
new_class._meta.parents.append(base)
new_class._meta.parents.extend(base._meta.parents)

0 comments on commit 16928a7

Please sign in to comment.