Project

General

Profile

0010-Add-command-get_tenant_by_domain.patch

Benjamin Dauvergne, 20 August 2014 03:23 PM

Download (1.06 KB)

View differences:

Subject: [PATCH 10/10] Add command get_tenant_by_domain

 .../multitenant/management/commands/get_tenant_by_domain.py   |    9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 entrouvert/djommon/multitenant/management/commands/get_tenant_by_domain.py
entrouvert/djommon/multitenant/management/commands/get_tenant_by_domain.py
1
from django.core.management.base import BaseCommand
2
from entrouvert.djommon.multitenant.middleware import TenantMiddleware
3

  
4
class Command(BaseCommand):
5
    help = "Create schemas"
6

  
7
    def handle(self, *args, **options):
8
        for arg in args:
9
            print TenantMiddleware.get_tenant_by_hostname(arg)
0
-