mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
simplify loading
This commit is contained in:
parent
cd343d224b
commit
8fc2610a9d
@ -659,15 +659,19 @@ MESSAGE_TAGS = {
|
|||||||
PLUGIN_URL = 'plugin'
|
PLUGIN_URL = 'plugin'
|
||||||
|
|
||||||
INTEGRATION_PLUGINS = []
|
INTEGRATION_PLUGINS = []
|
||||||
for plugin in inventree_plugins.load_integration_plugins():
|
|
||||||
INTEGRATION_PLUGINS.append(plugin())
|
|
||||||
|
|
||||||
INTEGRATION_PLUGIN_SETTINGS = {}
|
INTEGRATION_PLUGIN_SETTINGS = {}
|
||||||
INTEGRATION_PLUGIN_SETTING = {}
|
INTEGRATION_PLUGIN_SETTING = {}
|
||||||
INTEGRATION_PLUGIN_LIST = {}
|
INTEGRATION_PLUGIN_LIST = {}
|
||||||
|
|
||||||
for plugin in INTEGRATION_PLUGINS:
|
for plugin in inventree_plugins.load_integration_plugins():
|
||||||
INTEGRATION_PLUGIN_LIST[plugin.plugin_name()] = plugin
|
plugin = plugin()
|
||||||
|
plugin_name = plugin.plugin_name()
|
||||||
|
|
||||||
|
INTEGRATION_PLUGINS.append(plugin)
|
||||||
|
INTEGRATION_PLUGIN_LIST[plugin_name] = plugin
|
||||||
if plugin.mixin_enabled('settings'):
|
if plugin.mixin_enabled('settings'):
|
||||||
INTEGRATION_PLUGIN_SETTING[plugin.plugin_name()] = plugin.settingspatterns
|
plugin_setting = plugin.settingspatterns
|
||||||
INTEGRATION_PLUGIN_SETTINGS.update(plugin.settingspatterns)
|
|
||||||
|
INTEGRATION_PLUGIN_SETTING[plugin_name] = plugin_setting
|
||||||
|
INTEGRATION_PLUGIN_SETTINGS.update(plugin_setting)
|
||||||
|
Loading…
Reference in New Issue
Block a user