Re: Channels + django-tenants

2018-11-13 Thread lorinkoz
I know this is not general, but maybe `get_user` could accept an optional function as second parameter, so that the function could wrap the inner content of the current `get_user`. django-tenants provides a regular middleware, but I think the async breaks any attempt to handle this through a ch

Channels + django-tenants

2018-11-13 Thread lorinkoz
Django-tenants is a package to provide multi-tenancy in Django through Postgres schemas (https://github.com/tomturner/django-tenants/) Django-tenants relies on setting the schema on the connection in order to make queries to the right Postgres schema. When you want to secure your consumers with

Is there any way to disable dispatching of signals?

2018-07-19 Thread lorinkoz
Is there any way to disable dispatching of signals? If not, I truly truly think there should be a way to do it :) Possible use cases: - Prevent signals being called recursively because the signal code dispatched the same signal. - Disable for scripts or management commands - Just bypass the signa