2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-23 02:50:18 +00:00

settings UI integration

This commit is contained in:
Matthias
2021-09-17 22:47:49 +02:00
parent 682ee87267
commit 771c453c40
4 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
""" This module provides template tags for handeling plugins
"""
from django.utils.translation import ugettext_lazy as _
from django.conf import settings as djangosettings
from django import template
register = template.Library()
@register.simple_tag()
def plugin_list(*args, **kwargs):
""" Return a list of all installed integration plugins """
return djangosettings.INTEGRATION_PLUGIN_LIST
@register.simple_tag()
def plugin_settings(plugin, *args, **kwargs):
""" Return a list of all settings for a plugin """
return djangosettings.INTEGRATION_PLUGIN_SETTING.get(plugin)