django-model-utils: does InheritanceManager work if the parent model/class is abstract?

Go To StackoverFlow.com

5

django-model-utils. I'm attempting the very basic use of InhertianceManager as described in the docs.

nearby_places = Place.objects.filter(location='here').select_subclasses()

The only difference is that my parent model/class is abstract. Is this still supposed to work?

I am getting errors like

Caught DatabaseError while rendering: (1146, "Table 'proj.ParentModel' doesn't exist")

and

'Options' object has no attribute '_join_cache'

both of which are errors one typically gets when you attempt to do a query on an abstract class.

in my parent model i've defined the manager as follows:

class ParentModel(OrderedModel):
    objects = InheritanceManager()
2012-04-04 07:12
by w--


3

following the link from the docs to Jeff Elmore's blog (aka the author of the InheritanceManager) he describes how InheritanceManager works.

It is quite clear that the parent model/class cannot be abstract.

.... actually i should have figured this out from the code the first time around.....

2012-04-04 07:39
by w--
Ads