it's possible to connect a signal of "django.db.models.signals" with a function of "UnicornView" ? #139
Replies: 1 comment
-
Signals will fire outside of the request/response lifecycle, so if your idea is that a signal will update a page, then that's not really possible with Unicorn. If you want a change reflected on the page without triggering a request, then the closest you can get to that is a poll. Otherwise, you will have to look into websockets (Django Channels) which might be able to provide that functionality (that's out of scope for Unicorn, though). However, If you just want a signal to call the same code that you already have in a Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hello, I would like to know how I can execute a function of "UnicornView" from one of the signals of "django.db.models.signals". As far as I know, they are only usually called functions and not classes.
Thank you very much
Beta Was this translation helpful? Give feedback.
All reactions