Python Forum

Full Version: realtime database update in django
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
please help me if anyone know the process how can i update my webpage realtime when update my database. We need to page refresh to see the latest database update. I want to know the process how can i show update in my webpage when update database without refresh page.

thank you
Ajax is how the client can request updated info, but if the client doesn't know when it should look for more info (most of the time, it will), then you'll need to look into Pushing data.  I think the best way to do that currently is via websockets, falling back to long running ajax requests for clients that don't support websockets, and falling back to a timed ajax call for clients that don't like to keep open requests.

The easiest, by far, is to just use ajax requests every so often (10 seconds?), and send the server a timestamp of the most recent update you have, so it can send you all the updates since that time.