A
A
Andrey2015-05-05 17:31:02
Django
Andrey, 2015-05-05 17:31:02

How to make online notifications in Django?

Hello!
I would like to make messages on the site like Vkontakte, so that the user sees new messages without refreshing the page!
As I understand it, all this is done using WebSocket (socket.io), tell me how best to do this and which way to look ?!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2015-05-05
@sim3x

ajax after 2 seconds requests the url, if something has arrived - displays
if you bother - event source
https://pypi.python.org/pypi/eventsource
https://wiki.python.org/moin/PythonEvents
Websockets should be used if you need to send an almost real-time notification stream

U
un1t, 2015-05-05
@un1t

Dzhanga is not designed for such things, look better towards Tornado + SocksJS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question