mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #2491 from SchrodingersGat/double-bug-fix
Plugin API fix
This commit is contained in:
commit
c6330608e5
@ -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
|
||||
|
@ -1,7 +1,10 @@
|
||||
{% load i18n %}
|
||||
{% load plugin_extras %}
|
||||
|
||||
<h4>{% trans "Settings" %}</h4>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Settings" %}</h4>
|
||||
</div>
|
||||
|
||||
{% plugin_globalsettings plugin_key as plugin_settings %}
|
||||
|
||||
<table class='table table-striped table-condensed'>
|
||||
|
@ -1,7 +1,9 @@
|
||||
{% load i18n %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
<h4>{% trans "URLs" %}</h4>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "URLs" %}</h4>
|
||||
</div>
|
||||
{% define plugin.base_url as base %}
|
||||
<p>{% blocktrans %}The Base-URL for this plugin is <a href="/{{ base }}" target="_blank"><strong>{{ base }}</strong></a>.{% endblocktrans %}</p>
|
||||
|
||||
|
@ -127,8 +127,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% mixin_enabled plugin 'globalsettings' as globalsettings %}
|
||||
{% if globalsettings %}
|
||||
{% mixin_enabled plugin 'settings' as settings %}
|
||||
{% if settings %}
|
||||
{% include 'InvenTree/settings/mixins/settings.html' %}
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user