예제 #1
0
def autodiscover():
    """
    Autodiscovers the plugins in contrib/plugins.
    """
    PLUGINS_DIR = get_setting('PLUGINS_DIR')
    PLUGIN_MODULE_NAME = get_setting('PLUGIN_MODULE_NAME')

    for app_path in os.listdir(PROJECT_DIR(PLUGINS_DIR)):
        full_app_path = list(PLUGINS_DIR)
        full_app_path.append(app_path)
        if os.path.isdir(PROJECT_DIR(full_app_path)):
            try:
                import_module(
                    "vishap.{0}.{1}.{2}".format(
                        '.'.join(PLUGINS_DIR),
                        app_path,
                        PLUGIN_MODULE_NAME
                        )
                    )
            except ImportError as e:
                logger.debug(str(e))
            except Exception as e:
                logger.debug(str(e))
        else:
            pass
예제 #2
0
파일: test.py 프로젝트: atjandra001/fintech
 def override_settings():
     return get_setting('DEBUG')
예제 #3
0
파일: test.py 프로젝트: 18dubu/MMS
 def override_settings():
     return get_setting('DEBUG')