I'm new here, so please bear with me. I'm building a monitoring system using Django, and i want to add real time alerts to it.
Searching through the webs lead me to channels which promises to add event-driven functionality to Django, I've read the docs and followed this noob-friendly tutorial on how to build a simple notification system within a group of users, based on logins and logouts. But that did not help me; in that example, the dev defines functions that are directly mapped to 'websocket.connect' and 'websocket.diconnect' to send data (in this case username + is_logged_in) which is very limiting if you want to send information at any arbitrary point in time.
What i want to do is send a notification to an admin as soon as a security event is detected. in other words, i want to send data using channels based on information i have in my python code.
DISCLAIMER: i have no experience with channels or websockets, so i may be missing the obvious here!
Any help would be much appreciated.
Aucun commentaire:
Enregistrer un commentaire