Gustavo Picon is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

tabo / django-treebeard

Efficient tree implementations for Django 1.0+ :: https://tabo.pe/projects/django-treebeard/

Clone this repository (size: 602.0 KB): HTTPS / SSH
hg clone https://bitbucket.org/tabo/django-treebeard
hg clone ssh://hg@bitbucket.org/tabo/django-treebeard

Issues

#34 Working with abstract models / inherited models ?

Reported anonymously (last edited )

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

Status: invalid Responsible: Gustavo Picon Type: bug Priority: major
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Anonymous

    written

    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. #2 Gustavo Picon

    written

    • Changed responsible from nobody to tabo.
    • Changed status from new to invalid.

    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)

Add comment / attachment

Show/hide preview

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?