Answer the question
In order to leave comments, you need to log in
Action on the page when requested by the server?
I have a Django model with messages, when we create a new message, it is assigned the status "not yet shown", the user enters the page with messages, on which ajax makes a request to the server every half a second, and if there is a message with the status "not shown", a notification is displayed on the page you +1 new message, I want to redo the mechanism and make it so that when a new message is created, the server sends a command to the page and it already shows this message, that is, not ajax constantly requests the server, but the server itself notifies it, is it possible and what is the name of such a mechanism that I want to make?
Answer the question
In order to leave comments, you need to log in
Possibly via websocket 's. Using websockets in Django requires Django Channels .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question