Add command get_tenant_by_domain

refs #5106
This commit is contained in:
Benjamin Dauvergne 2014-08-20 15:14:01 +02:00 committed by Frédéric Péters
parent 840d94056d
commit 61e474114b
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)