Projet

Général

Profil

« Précédent | Suivant » 

Révision 5c1d1ad6

Ajouté par Benjamin Dauvergne il y a plus de 9 ans

Add command get_tenant_by_domain

refs #5106

Voir les différences:

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.hostname2schema(arg)

Formats disponibles : Unified diff