Acyclic Count in Django

I would like to get the acyclic graph structure in Django. For example, I have several categories in a tree structure:

Guitars - Classical Guitars - Western Guitars - Guitars for Children Ukuleles - Soprano Ukulele - Concert Ukulele - Baryton Ukulele - Ukuleles for Children 

Now I would like to add the For Children category and create a link to the existing Guitars for Children and Ukuleles for Children categories. But I have to avoid loops in this graph.

What is the easiest way to achieve it? Can django-mptt use django-mptt ? I need a dynamic and easily modifiable admin. You can imagine it as a category structure in a complex eshop.

+6
source share
1 answer

You can try django-dag . I do not have much experience with this, but it can fit.

+1
source

Source: https://habr.com/ru/post/948131/


All Articles