Amirouche, thank you very much. jQuery solution is quite interesting but it's more complicated for me to implement. So I think I gonna use your first idea =). django-mptt is very simple to install and it's well documented. Thank you very much. Your help is inestimable.
среда, 16 января 2013 г., 17:01:21 UTC+4 пользователь Amirouche написал: > > > 2013/1/16 Sammael <s4m...@gmail.com <javascript:>> > >> Unfortunately, I don't know how it should be. Also I believe your idea of >> trees is much simpler and cleaner and thus much better. >> >> I've installed django-mptt, and it works like a charm. But I'm worried it >> would be difficult to upgrade to a new Django version if I use third-party >> applications. So I was trying to implement similar approach using >> ForeignKey to self, just like django-mptt does: >> > > Sorry, I wasn't clear, I was thinking only thinking about a tree widget > not a full blown hierarchical tags which can be indeed a pain. > > like the following: > - http://www.jstree.com/ > - https://github.com/bombino/jquery-tree-select > - http://code.google.com/p/jquery-option-tree/ > > at least jquery-tree-select use only one select element in html + > javascript, so in python it's just a matter a formatting properly the > options: > > << [...] transforms it into a select box that just shows (none), Category > 1, and Category 2. Then when you click on Category 1, a new select box pops > up showing Subcategory 1 and Subcategory 2.>> > > HTH > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/W0NeT7ZwS28J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.