Open aduquehd opened 6 years ago
See https://django-tenant-schemas.readthedocs.io/en/latest/use.html#tenant_context
from tenant_schemas.utils import tenant_context
for tenant in Tenant.objects.all():
with tenant_context(tenant):
# do stuff in each tenant
Thank you so much!
Actually, I need to specify a tenant name.
I want to execute a script that populates some models data for all tenants. No just one.