[Python-modules-commits] [django-polymorphic] 11/14: Inheriting managers only works for abstract classes.
Michael Fladischer
fladi at moszumanska.debian.org
Sun Sep 4 07:30:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch master
in repository django-polymorphic.
commit 6b4c202531856fd61faa92f1ab83893c6ffbe886
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Sat Sep 3 22:21:23 2016 +0200
Inheriting managers only works for abstract classes.
The base class from which a manager shall be inherited has to be abstract. This
is a requirement by Django that has not been taken into accoutn by upstream yet.
---
polymorphic/tests.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/polymorphic/tests.py b/polymorphic/tests.py
index 379e955..d2db259 100644
--- a/polymorphic/tests.py
+++ b/polymorphic/tests.py
@@ -211,6 +211,9 @@ class MROBase1(ShowFieldType, PolymorphicModel):
objects = MyManager()
field1 = models.CharField(max_length=10) # needed as MyManager uses it
+ class Meta:
+ abstract = True
+
class MROBase2(MROBase1):
pass # Django vanilla inheritance does not inherit MyManager as _default_manager here
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-polymorphic.git
More information about the Python-modules-commits
mailing list