Any existing dynamic form solutions in Django?

I am looking for existing solutions for creating dynamic forms with Django. What I want to get is a form that looks like a table, but when you click any of its cells, the text box is dynamically displayed instead of text, and then the user can edit the value.

I know this rather abstract description, but I would really appreciate everything related: if this library / framework completely reloads the whole table to switch it from completely read-only, this is also fine.

I am implementing a proof of concept for a web application, so I would like not to waste time implementing it from scratch.

The description is unclear, I believe. Here he is:

  • There is a list of users. Just a simple table. The administrator clicks on one of these users and the profile is displayed:

    Input: jsmith

    Real Name: John Smith

    Group: Users

  • Then the administrator double-clicks "John Smith" and the text field is loaded instead of text:

    Input: jsmith

    Real Name: [John Smith]

    Group: Users

    [Save Cancel]

  • Now the administrator can change the real name jsmith. If you click "Save", the data will be sent to the server. If the β€œCancel” button is pressed, the data will be returned and the profile on page 1.

Update: what I want is what we have on stackoverflow.com - write a comment (don't reply) and post it. Then you can edit it without reloading the page. This is what I talked about before. So I need something similar, but extensible and Django-injection

+4
source share
2 answers

It looks like you need a Javascript Data Grid widget. The Ext JS application has a good example, for example:

http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/cell-editing.html

Now note that 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 only means that your server is running Javascript, and that you correctly spelled any Ajax calls. But here is the next step.

+1
source

I found InplaceEditForm , which is easy to install from svn (link at the bottom of the page), and it is really straightforward to configure. This is not as good as the JS suite mentioned by spacedman, but it works easily. Please note that you must be authorized with permissions in order to be able to use it (it took me a while to understand). So just log in to your administrator, then go back to the test page.

It would be nice to edit a couple of fields here and there, but I am looking for a table, for example editing (for example, a spacedman link), so I will probably continue the search

+2
source

All Articles