Add command get_tenant_by_domain

refs #5106
This commit is contained in:
Benjamin Dauvergne 2014-08-20 15:14:01 +02:00
parent 3afe385b85
commit 5c1d1ad6c9
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
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)