MCPcopy Create free account
hub / github.com/WebODM/WebODM / get_active_plugins

Function get_active_plugins

app/plugins/functions.py:251–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249
250
251def get_active_plugins():
252 if settings.MIGRATING: return []
253
254 plugins = []
255 try:
256 enabled_plugins = [p.name for p in Plugin.objects.filter(enabled=True).all()]
257 for plugin in get_plugins():
258 if plugin.get_name() in enabled_plugins:
259 plugins.append(plugin)
260 except Exception as e:
261 logger.warning("Cannot get active plugins. If running a migration this is expected: %s" % str(e))
262
263 return plugins
264
265
266def get_plugin_by_name(name, only_active=True, refresh_cache_if_none=False):

Callers 6

get_plugins_js_includesFunction · 0.90
get_plugins_css_includesFunction · 0.90
get_plugins_main_menusFunction · 0.90
register_pluginsFunction · 0.85
get_plugin_by_nameFunction · 0.85
root_url_patternsFunction · 0.85

Calls 3

get_pluginsFunction · 0.85
get_nameMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected