django-treebeard

Is it possible to integrate django-taggit and django-mptt / django-treebeard?

£可爱£侵袭症+ 提交于 2020-01-13 11:15:30
问题 I am developing a website that requires tagging up different types of content, which favors using django-taggit. But, it would be extremely beneficial if the tags were represented in the database in their natural hierarchy, favoring use of django-mptt or django-treebeard. What is the best solution to integrate the generic tagging functionality of taggit with the tree-structure provided by mptt / treebeard? 回答1: I used treebeard and taggit's custom through models to implement hierarchical tags

Is it possible to integrate django-taggit and django-mptt / django-treebeard?

随声附和 提交于 2020-01-13 11:15:19
问题 I am developing a website that requires tagging up different types of content, which favors using django-taggit. But, it would be extremely beneficial if the tags were represented in the database in their natural hierarchy, favoring use of django-mptt or django-treebeard. What is the best solution to integrate the generic tagging functionality of taggit with the tree-structure provided by mptt / treebeard? 回答1: I used treebeard and taggit's custom through models to implement hierarchical tags

Django treebeard what are differences between AL, NS, MP

旧街凉风 提交于 2019-12-31 08:08:05
问题 I'm trying to make a model for categorizing some objects. I already tried using django-mptt to easily retrieve related categories, and now I'm searching different solutions to find the best one. I can't find out though what are main differences between Materialized Path, Adjacency List and Nested Set. Wikipedia didn't give me a short answer, all I know is mptt is probably Nested Set... Can anyone explain it to me in few words ? 回答1: It's easier to explain with examples than with a few words.

Exception when trying to install Django-Treebeard based on instructions

五迷三道 提交于 2019-12-08 19:28:32
I'm getting a non-descriptive (or at least I don't know how to interpret in this context) error message when sub-lassing from a Django-Treebeard node and am not sure how to debug. I'm using the installation instructions at: http://code.tabo.pe/django-treebeard/src/tip/tbexample/ (see at end of posting). I create a subclass of MP_Node and the syncdb works. However, loading the models.py code into a shell produces a "list index out of range" error - see code and trace below. Thanks for your help. Python 2.6.4, Django 1.1, Treebeard 1.1: try: from django.db import models, transaction from django

Exception when trying to install Django-Treebeard based on instructions

喜欢而已 提交于 2019-12-08 03:15:17
问题 I'm getting a non-descriptive (or at least I don't know how to interpret in this context) error message when sub-lassing from a Django-Treebeard node and am not sure how to debug. I'm using the installation instructions at: http://code.tabo.pe/django-treebeard/src/tip/tbexample/ (see at end of posting). I create a subclass of MP_Node and the syncdb works. However, loading the models.py code into a shell produces a "list index out of range" error - see code and trace below. Thanks for your

Is it possible to integrate django-taggit and django-mptt / django-treebeard?

♀尐吖头ヾ 提交于 2019-12-05 14:18:00
I am developing a website that requires tagging up different types of content, which favors using django-taggit. But, it would be extremely beneficial if the tags were represented in the database in their natural hierarchy, favoring use of django-mptt or django-treebeard. What is the best solution to integrate the generic tagging functionality of taggit with the tree-structure provided by mptt / treebeard? Tentacles I used treebeard and taggit's custom through models to implement hierarchical tags. Just found this yesterday, so I can't really tell if it's what you're looking for: django

Django treebeard what are differences between AL, NS, MP

穿精又带淫゛_ 提交于 2019-12-02 14:54:55
I'm trying to make a model for categorizing some objects. I already tried using django-mptt to easily retrieve related categories, and now I'm searching different solutions to find the best one. I can't find out though what are main differences between Materialized Path, Adjacency List and Nested Set. Wikipedia didn't give me a short answer, all I know is mptt is probably Nested Set... Can anyone explain it to me in few words ? It's easier to explain with examples than with a few words. Consider the sample tree, storing names: William Jones Blake Adams Tyler Joseph Miller Flint Materialized

Django: How do I model a tree of heterogeneous data types?

和自甴很熟 提交于 2019-11-27 14:13:18
问题 I need to store a tree data structure in my database, for which I plan on using django-treebeard or possibly django-mptt. My source of confusion is that each node could be one of three different possible types: root nodes will always be a type A entity, leaf nodes a type C entity, and anything in between will be a type B entity. I would like to know the best way to model this situation. update: I first tried model inheritance, and I think that this could be the best way to go. Unfortunately