Did I find the right examples for you? yes no

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

        def import_module_attr(module):
    module, _, cls = module.rpartition('.')
    module = import_module(module)
    attr = getattr(module, cls)
    return attr
        


src/d/j/django-require-1.0.6/require/environments.py   django-require(Download)
 
from require.conf import settings as require_settings
from require.helpers import import_module_attr
 
 
def load_environment():
    environment = require_settings.REQUIRE_ENVIRONMENT
    aliases = require_settings.REQUIRE_ENVIRONMENT_ALIASES
    environment = aliases.get(environment, environment)
    environment = import_module_attr(environment)