Hi all,
I need some tips about the table implementation in Django.
In my project, I’ve some models to store the data, and I would like to:
- show the data on my template;
- use three buttons, one to add a row, the second to delete the row and the other to save the data.
I’ve already created a class on JavaScript to create a table using a dictionary.
I’m new to Django (and the development), and I need to understand how I can architected the page. In my mind, the idea is:
- on my views, when I open the template, I’ll render the data present on the model. Using serialization to extract the data, and send it to javascript’s table create class ;
- create two javascript class: one the add a row the other to delete it,
- create on JavaScript a class called “Save”. When I’m saving, I’ll send an Http Rest Post/Delete/Put method to Django;
- Django sent me a new render after to make the modification (render all the template???)
I fear that I will have a new render each time I change my page. An alternative is to create a second view without rendering to answer the request provided by the HTML page.
Do you have any tips for more efficient handling of the tables?
Thank you, for your kind answers.
Kind regard,
Giorgio
Giorgio Bonacorsi