I would like to implement the following user-group structure in my application:
Group_1
Group_1_1
Group_1_2
Group_2
Group_2_1
Group_2_1_1
I did manage to do that with django-mptt, but I am facing the following problem at the moment:
In the user-interface I would like to have something like this:
Memberships:
--------------------
[ ] Group_1
[ ] Group_1_1
[ ] Group_1_2
[ ] Group_2
[ ] Group_2_1
[ ]Group_2_1_1
and if a User wants to join Group_1_1 and Group_2_1, the checkboxes for joining Group_1 and Group_2 are automatically checked as well, like this:
Memberships:
--------------------
[x] Group_1
[x] Group_1_1
[ ] Group_1_2
[x] Group_2
[x] Group_2_1
[ ]Group_2_1_1
It feels like it isn't too hard to accomplish with this pseudocode:
If checked_group has parent:
check parent_group
There is a JQuery solution for this, but I think it should be able to accomplish without the use of that, but if it really isn't - what's the best way of implementing the linked app to a django project?