This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
python-entrouvert/entrouvert/djommon/multitenant/management/commands/get_tenant_by_domain.py

10 lines
302 B
Python

from django.core.management.base import BaseCommand
from entrouvert.djommon.multitenant.middleware import TenantMiddleware
class Command(BaseCommand):
help = "Create schemas"
def handle(self, *args, **options):
for arg in args:
print TenantMiddleware.hostname2schema(arg)