I’m looking for existing solutions for building dynamic forms with Django. What I want to get is a form that looks just like a table, but when any of its cells are clicked, textbox is dynamically displayed instead of the text and then user can edit the value.
I know that’s quite an abstract description but I’d really appreciate everything related: if that library/framework will reload absolutely all table to switch it from completely read-only to completely editable, that’s also fine.
I’m implementing a proof of concept web application, so I’d like to avoid spending time for implementing it from scratch.
The description is unclear, I believe. Here it is:
-
There’s a list of users for instance. Just a simple table. Administrator clicks one of these users and profile is displayed:
Login: jsmith
Real Name: John Smith
Group: Users
-
Then administrator double-clicks “John Smith” and text box is loaded instead of text:
Login: jsmith
Real Name: [ John Smith ]
Group: Users
[Save] [Cancel]
-
Administrator can now modify jsmith’s real name. If Save is clicked, data is sent to server. If Cancel is clicked, data is reverted and profile is as on p.1
Update: what I want is what we have here on stackoverflow.com – write a comment (not answer) and post it. Then you can edit it without reloading the page. That’s what I’ve been talking about before. So, I need something of that kind but extendable and Django-injectable
Sounds like what you want is a Javascript Data Grid widget. The Ext JS toolkit has a nice example, something like this:
http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/cell-editing.html
Now note this has nothing to do with Django, these things can be deployed by any web server or application server.
Of course implementing this on a Django server just means making sure your server is serving the Javascript, and that you’ve written any Ajax calls correctly. But thats the next step.