Ask Your Question
1

Is it possible to update a Django table from a MySQL query without having to refresh the entire page?

asked 2023-07-17 02:12:48 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-17 02:35:02 +0000

nofretete gravatar image

Yes, it is possible to update a Django table from a MySQL query without having to refresh the entire page by using asynchronous requests with AJAX. With AJAX, you can send a request to the Django view function that will update the database using the MySQL query and return a response without refreshing the page. This can be done by adding an event listener to an HTML element which sends an XMLHttpRequest to the Django view function when triggered. The view function can then update the table in the Django models, and return a JSON response that can be processed by the client-side JavaScript to update the data on the page.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-17 02:12:48 +0000

Seen: 16 times

Last updated: Jul 17 '23