Closed Bluetip33 closed 5 years ago
Any file. Call send_event()
whenever you need to send an event. For example, in a view handler.
Hi, Sorry i'm new to Django and still don't understand, can a view handler be the views.py. And if i put it in there, it would go in a function which needs to return a HttpRepsonse but the send_event('test', 'message', {'text': 'hello world'}) doesn't.
Thanks for any help.
Exactly. For example, in the chat example, you can see the messages
function which calls send_event
.
Thanks for the help, checking it out now.
Hi, I have got to the to the part, where you place the send_event info into a file but i don't know which file?.
Thanks.