Пример #1
0
 def __init__(self, path, map):
     self.path, self.map = path, map
     if self.path:
         self.module = import_module(self.path)
Пример #2
0
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)
Пример #3
0
def include(path):
    router_module = import_module(path)
    cmdpatterns = getattr(router_module, 'cmdpatterns')
    return cmdpatterns