def __init__(self, path, map): self.path, self.map = path, map if self.path: self.module = import_module(self.path)
def get_auth_backend_from_settings(settings): settings_dict = dict(settings.items(config.SECTION_NAME)) module, target = settings_dict['auth'].rsplit('.',1) module = import_module(module) target = getattr(module,target) return target(settings)
def include(path): router_module = import_module(path) cmdpatterns = getattr(router_module, 'cmdpatterns') return cmdpatterns