2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-08 04:40:57 +00:00

mixin_enabled check for templates

This commit is contained in:
Matthias
2021-09-18 04:46:50 +02:00
parent 1c781d9bf0
commit 3b2cb43ece
3 changed files with 19 additions and 4 deletions

View File

@@ -19,3 +19,9 @@ def plugin_list(*args, **kwargs):
def plugin_settings(plugin, *args, **kwargs):
""" Return a list of all settings for a plugin """
return djangosettings.INTEGRATION_PLUGIN_SETTING.get(plugin)
@register.simple_tag()
def mixin_enabled(plugin, key, *args, **kwargs):
""" Return if the mixin is existant and configured in the plugin """
return plugin.mixin_enabled(key)