Any way to label the edges?

26 views
Skip to first unread message

Reeshabh Kumar Ranjan

unread,
Nov 22, 2020, 1:49:13 AM11/22/20
to django-mptt-dev
I wanted to model a Questionnaire in a tree-like structure where a node is a Question object. Each edge going out of it is an Option object. I was trying to do it myself until I stumbled upon MPTT. However, I am unable to see any way to add labelled edges. And if there is a way to add labelled edges, I am unable to see any option to get labelled edges going out of the current node.

Matthias Kestenholz

unread,
Nov 22, 2020, 8:52:40 AM11/22/20
to django-...@googlegroups.com
Hi,

Nested sets respectively MPTT doesn't offer a way to do this. You have to research other options for modelling your data structure. Maybe you could use django-mptt for the tree and use an additional model for the edges but I'm not sure that's a good idea – you'll have to keep two data structures in sync.

Best,
Matthias



On Sun, Nov 22, 2020 at 7:49 AM Reeshabh Kumar Ranjan <reesha...@iiitd.ac.in> wrote:
I wanted to model a Questionnaire in a tree-like structure where a node is a Question object. Each edge going out of it is an Option object. I was trying to do it myself until I stumbled upon MPTT. However, I am unable to see any way to add labelled edges. And if there is a way to add labelled edges, I am unable to see any option to get labelled edges going out of the current node.

--
You received this message because you are subscribed to the Google Groups "django-mptt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-mptt-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-mptt-dev/468a964c-eb7e-4a6d-9a82-626dd934a89cn%40googlegroups.com.


--
Feinheit AG - Matthias Kestenholz - Direkt +41 79 444 78 96 - Zentrale +41 555 11 11 41

Reply all
Reply to author
Forward
0 new messages