1

I have a python+django project and want to implement following functionality: by certain trigger (at certain time or by manual admin action) show message to all active users (i.e. to all sessions).

Webpush seems unnecessary here as far as django has nice built-in messages subframework.

I guess I may develop such functionality manually: make sql table session_messages, each time take snapshot of all sessions and show message, perform some checks to assure that message is shown only once and only to active users, etc. etc.

Question: maybe there is some nice little library that already does it? Or even maybe django messages are able to do it "from the box"?

I've googled a bit but found only packages for webpush integrations.

Thanks :)

Vitaly Trifanov
  • 631
  • 2
  • 8
  • 17

1 Answers1

-1

You must implement a software architecture based on django channels, redis or rabbitmq and signals

Basically you must open a socket at the moment the user logs in, add the authenticated user to a group, and when you trigger the event with the signals send a message to the group