Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

        def get_private_apps():
    from django.db.models import get_models, get_app, get_apps
    from tenant import settings
    
    if settings.MULTITENANT_PRIVATE_APPS is not None:
        include = [app.split('.')[-1] for app in settings.MULTITENANT_PRIVATE_APPS]
        
#        include = []
#        for app in settings.MULTITENANT_PRIVATE_APPS:
#            app = app.split('.')[-1]
#            include.extend(get_models(get_app(app)))
    else:
        include = [app_mod.__name__.split('.')[-2] for app_mod in get_apps()]
    
    if settings.MULTITENANT_PRIVATE_APPS_EXCLUDE is not None:
        exclude = [app.split('.')[-1] for app in settings.MULTITENANT_PRIVATE_APPS_EXCLUDE]
        
#        exclude = []
#        for app in settings.MULTITENANT_PRIVATE_APPS_EXCLUDE:
#            app = app.split('.')[-1]
#            exclude.extend(get_models(get_app(app)))
    else:
        exclude = []
    return list(set(include) - set(exclude))
        


src/d/j/django-multitenant-HEAD/tenant/routers.py   django-multitenant(Download)
from tenant import settings
from tenant.utils import get_public_apps, get_private_apps
from tenant.utils import get_current_tenant