mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 04:56:45 +00:00
initiate plugins on startup
This commit is contained in:
parent
eaffd5fd0c
commit
04eee50653
@ -652,14 +652,15 @@ MESSAGE_TAGS = {
|
||||
# Plugins
|
||||
PLUGIN_URL = 'plugin'
|
||||
|
||||
INTEGRATION_PLUGINS = inventree_plugins.load_integration_plugins()
|
||||
INTEGRATION_PLUGINS = []
|
||||
for plugin in inventree_plugins.load_integration_plugins():
|
||||
INTEGRATION_PLUGINS.append(plugin())
|
||||
|
||||
INTEGRATION_PLUGIN_SETTINGS = {}
|
||||
INTEGRATION_PLUGIN_SETTING = {}
|
||||
INTEGRATION_PLUGIN_LIST = {}
|
||||
|
||||
for plugin in INTEGRATION_PLUGINS:
|
||||
plugin = plugin()
|
||||
INTEGRATION_PLUGIN_LIST[plugin.plugin_name()] = plugin
|
||||
if plugin.mixin_enabled('settings'):
|
||||
INTEGRATION_PLUGIN_SETTING[plugin.plugin_name()] = plugin.settingspatterns
|
||||
|
@ -128,11 +128,9 @@ translated_javascript_urls = [
|
||||
]
|
||||
|
||||
# Integration plugin urls
|
||||
integration_plugins = inventree_plugins.load_integration_plugins()
|
||||
integration_plugins = settings.INTEGRATION_PLUGINS
|
||||
interation_urls = []
|
||||
for plugin in integration_plugins:
|
||||
# initialize
|
||||
plugin = plugin()
|
||||
if plugin.mixin_enabled('urls'):
|
||||
interation_urls.append(plugin.urlpatterns)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user