Reputation: 1
I have overridden django_tenants.utils.tenant_context
to activate a timezone specific to the tenant.
class NewTenantContext(tenant_context): ...
I can use the new context like this
with ALSTenantContext(tenant): ...
All this works fine for a specific process to start for a tenant.
But how do I make sure NewTenantContext
is used when tenant is set from Admin or API?
Upvotes: 0
Views: 255
Reputation: 1
I am able to resolve this by overriding middleware django_tenants.middleware.TenantMainMiddleware
Upvotes: 0