Open aprams opened 1 year ago
Yes, even I wanted to understand if django-multitenant is compatible with ASGI and Channels server. I am new to Channels and ASGI, so need some advice before I port my current Django app which uses this library into an ASGI mode for some of the new features.
@darwing1210 Do we have an eta when this can be released?
@darwing1210 Do we have an eta when this can be released?
I'm not sure, as it was never reviewed by the repo owners
Hey @darwing1210 @arpanpreneur I'm reviewing right now. Thanks for your contributions
@gurkanindibay This can be closed as per https://github.com/citusdata/django-multitenant/commit/fd84aeee9f71f66775a5f4256102f9010418a940 right?
Thanks for the contributions - amazing project, thanks a lot! :)
We are looking to switch to ASGI soon and are freshly using django-multitenant as well. As the
threading.local
is being used by django-multitenant, I'm afraid of cross-request tenant leakages. I therefore suggest an approach similar to django-simple-history:This should use asgiref's
Local
as an asgi-safe alternative tothreading.locals
as per my understanding. As asgiref.local is meant as a drop-in replacement, the change should be straightforward.