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
def override_settings(): return get_setting('DEBUG')
def override_settings(): return get_setting('DEBUG')