How to save modified tree on server?

8 views
Skip to first unread message

Michal Jedryka

unread,
Oct 18, 2011, 1:08:45 PM10/18/11
to dojango-users
Hi all!
Dojo widget tree has everything I need, ie context menus, drag & drop
editing of branches, etc. But all these bells and whistles make sense
if
I can write it to the database.
E. g. if I drag item from one branch to another I would like to save
this change in
the database.
The server is Django and the tree representation in the table is very
simple.
Each category have the "parent" (multi-category), and Table
"item" has a field "category" and of course, relationships are
defined.

Well, I'm looking for a method which would allow to upload information
changes made ​​by the widget, for example by changing the order
pulling, name change via the context menu, copy, paste, etc.

Of course you can combine a manual transmission index AJAX
or something, but I do not want to believe that there was no simple
and obvious solution.
One solution would be sent to the server XML or JSON-a,
which would include a modified structure. On the server, I would have
is handled. But I don't know how to get _modified_ datastore to send?
Is it such a feature, or do I have to write it yourself?
I'm still in point of departure.

Maybe it's because I'm not a specialist in javascript ...

Could I ask for a hint?

I would like to thank you in advance

Michał Jędryka
Reply all
Reply to author
Forward
0 new messages