diff --git a/InvenTree/plugin/models.py b/InvenTree/plugin/models.py index 811ed5b431..93c6335497 100644 --- a/InvenTree/plugin/models.py +++ b/InvenTree/plugin/models.py @@ -55,9 +55,9 @@ class PluginConfig(models.Model): # extra attributes from the registry def mixins(self): - if self.plugin: + try: return self.plugin._mixinreg - else: + except (AttributeError, ValueError): return {} # functions diff --git a/InvenTree/templates/InvenTree/settings/mixins/settings.html b/InvenTree/templates/InvenTree/settings/mixins/settings.html index 3c87da8678..910d4bbfbb 100644 --- a/InvenTree/templates/InvenTree/settings/mixins/settings.html +++ b/InvenTree/templates/InvenTree/settings/mixins/settings.html @@ -1,7 +1,10 @@ {% load i18n %} {% load plugin_extras %} -

{% trans "Settings" %}

+
+

{% trans "Settings" %}

+
+ {% plugin_globalsettings plugin_key as plugin_settings %} diff --git a/InvenTree/templates/InvenTree/settings/mixins/urls.html b/InvenTree/templates/InvenTree/settings/mixins/urls.html index 4bebfbce89..0a7b029762 100644 --- a/InvenTree/templates/InvenTree/settings/mixins/urls.html +++ b/InvenTree/templates/InvenTree/settings/mixins/urls.html @@ -1,7 +1,9 @@ {% load i18n %} {% load inventree_extras %} -

{% trans "URLs" %}

+
+

{% trans "URLs" %}

+
{% define plugin.base_url as base %}

{% blocktrans %}The Base-URL for this plugin is {{ base }}.{% endblocktrans %}

diff --git a/InvenTree/templates/InvenTree/settings/plugin_settings.html b/InvenTree/templates/InvenTree/settings/plugin_settings.html index f8ab02de3e..59178300ac 100644 --- a/InvenTree/templates/InvenTree/settings/plugin_settings.html +++ b/InvenTree/templates/InvenTree/settings/plugin_settings.html @@ -127,8 +127,8 @@ -{% mixin_enabled plugin 'globalsettings' as globalsettings %} -{% if globalsettings %} +{% mixin_enabled plugin 'settings' as settings %} +{% if settings %} {% include 'InvenTree/settings/mixins/settings.html' %} {% endif %}