You'll have to send something from the browser (submit a form, AXAX, or websockets) to a Django view and update something somewhere -- in Redis or your database, probably. Then have your infinite loop check that location for an updated value. I recommend Redis for this purpose.
-- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOzwKwHH7Srm5StKfa69p_SoXZUYGPsJoC7RhUcwo-13oDka5Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.