mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add setting for reload
This commit is contained in:
parent
51860a4e7b
commit
8f10ef817c
@ -1002,6 +1002,13 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'PLUGIN_ON_STARTUP': {
|
||||
'name': _('Check plugins on startup'),
|
||||
'description': _('Check that all plugins are installed on startup - enable in container enviroments'),
|
||||
'default': False,
|
||||
'validator': bool,
|
||||
'requires_restart': True,
|
||||
},
|
||||
# Settings for plugin mixin features
|
||||
'ENABLE_PLUGINS_URL': {
|
||||
'name': _('Enable URL integration'),
|
||||
|
@ -30,9 +30,11 @@ class PluginAppConfig(AppConfig):
|
||||
|
||||
if not registry.is_loading:
|
||||
# this is the first startup
|
||||
from common.models import InvenTreeSetting
|
||||
|
||||
# make sure all plugins are installed
|
||||
registry.install_plugin_file()
|
||||
if InvenTreeSetting.get_setting('PLUGIN_ON_STARTUP'):
|
||||
# make sure all plugins are installed
|
||||
registry.install_plugin_file()
|
||||
|
||||
# get plugins and init them
|
||||
registry.collect_plugins()
|
||||
|
Loading…
Reference in New Issue
Block a user