feat: Implement Dockerized multi-tenant Django application with initial setup for database, migrations, and superuser creation.
This commit is contained in:
@@ -7,6 +7,7 @@ Management команда для создания нового тенанта (
|
||||
"""
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.db import transaction
|
||||
from django.conf import settings
|
||||
from tenants.models import Client, Domain
|
||||
import re
|
||||
|
||||
@@ -115,7 +116,8 @@ class Command(BaseCommand):
|
||||
def get_domain_name(self, default_subdomain):
|
||||
"""Получить доменное имя"""
|
||||
while True:
|
||||
default_domain = f'{default_subdomain}.localhost'
|
||||
domain_base = getattr(settings, 'TENANT_DOMAIN_BASE', 'localhost')
|
||||
default_domain = f'{default_subdomain}.{domain_base}'
|
||||
domain = input(f'Доменное имя [{default_domain}]: ').strip().lower()
|
||||
|
||||
if not domain:
|
||||
|
||||
Reference in New Issue
Block a user