Reputation: 2044
I use https://github.com/mrjoes/sockjs-tornado
for a Django app. I can send messages from javascript console very easy. But I want to create a signal in Django and send json string once the signal is active.
Could anyone give me a way to send a certain message in Python to sockjs-tornado socket server?
Upvotes: 6
Views: 2349
Reputation: 6684
I just put this up https://github.com/amagee/sockjs-client for talking directly to a SockJS server from Python (using xhr streaming).
Upvotes: 0
Reputation: 420
I've wrote djazator, simple and easy to use django plugin. It uses zeromq for delivering messages from django to sockjs-tornado. Additionally, it can send messages to subset of authenticated django users.
Upvotes: 1
Reputation: 1818
There are few options how to handle it:
In most of the cases, it is either first or second option. Some people prefer using 3rd option though.
Upvotes: 6