[Answer]-How to update data on field on a website from SQL database with AJAX and Django

1πŸ‘

βœ…

I think you’re over-thinking the issue. This is a solved problem and almost all websites use it today: use AJAX. JQuery has a builtin ajax feature that makes sending ajax requests very easy.

On the server side, create an url endpoint. Ideally you will have unique endpoints for each resource that you store in your database. For example:

http://mywebsite.com/book/?uid=124234

This url would theoretically provide a CRUD interface for the book with ID 124234. You can update this object by issuing a POST request. Or you can get all of its data by issuing a GET request.

I hope this helps.

πŸ‘€systemizer

0πŸ‘

If you are making use of Django for your framework, then I would suggest looking at django-socketio

πŸ‘€Reinbach

Leave a comment