1. Gustavo Picon
  2. django-treebeard
Issue #34 invalid

Working with abstract models / inherited models ?

Anonymous created an issue

Hey there,

i am playing with both mptt and treebeard atm and cannot get them to work with the model setup i'd like to use.

Here's what i'd LIKE to use

abstractModel baseModel(abstractModel, NS_Node) *actualModel(baseModel)

The idea is to have an abstract model to start with. It provides some common fields to stick to DRY. The baseModel is a generic object that is supposed to hold the tree. The actualModel is inheriting from baseModel to add type-specific Fields to mix different objects in a single tree (wich is stored in the baseModel table).

Now no matter what i tried i get unknown column errors when adding children (root nodes work). I also tried without the abstract model and hence having baseModel(NS_Node).

Is there any way to get treebeard to work like outlined ?

Kind Regards and thanks in advance, Thorsten

Comments (2)

  1. Anonymous

    Scrap the abstract basemodel. I'd be fine with any kind of inheritance really. Easytree handles that case fine, but it has quite some bugs and is discontinued.

    Regards, Thorsten

  2. Gustavo Picon repo owner

    I don't understand your problem. The whole model design of treebeard is inheritance based, which is exactly what you want to do.

    (also closing ticket since this is more an open question than a bug report)

  3. Log in to comment