Esempio n. 1
0
def inplugin(value):
    plugins = DatalPluginPoint().get_plugins()
    for plugin in plugins:
        if plugin.is_active() and hasattr(plugin, value) and getattr(
                plugin, value):
            return True
    return False
Esempio n. 2
0
def plugins_call(context, method_name):
    response = ''
    plugins = DatalPluginPoint().get_plugins()
    for plugin in plugins:
        if plugin.is_active() and hasattr(plugin, method_name):
            method = getattr(plugin, method_name)
            response += method(context)
    return response