diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 030ea1d5ae..392f7aa84e 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -875,12 +875,13 @@ MAINTENANCE_MODE_RETRY_AFTER = 60 PLUGIN_DIRS = ['plugin.builtin', ] if not TESTING: + # load local deploy directory in prod PLUGIN_DIRS.append('plugins') -# load samples if in debug mode if DEBUG or TESTING: + # load samples in debug mode PLUGIN_DIRS.append('plugin.samples') -# Test settings -PLUGIN_TESTING = get_setting('PLUGIN_TESTING', TESTING) # used to force enable everything plugin -PLUGIN_TESTING_SETUP = get_setting('PLUGIN_TESTING_SETUP', False) +# Plugin test settings +PLUGIN_TESTING = get_setting('PLUGIN_TESTING', TESTING) # are plugins beeing tested? +PLUGIN_TESTING_SETUP = get_setting('PLUGIN_TESTING_SETUP', False) # load plugins from setup hooks in testing? diff --git a/InvenTree/plugin/registry.py b/InvenTree/plugin/registry.py index d026662f7c..5fdb86f359 100644 --- a/InvenTree/plugin/registry.py +++ b/InvenTree/plugin/registry.py @@ -129,7 +129,7 @@ class Plugins: if modules: [self.plugin_modules.append(item) for item in modules] - # check if running in testing mode and apps should be loaded from hooks + # check if not running in testing mode and apps should be loaded from hooks if (not settings.PLUGIN_TESTING) or (settings.PLUGIN_TESTING and settings.PLUGIN_TESTING_SETUP): # Collect plugins from setup entry points for entry in metadata.entry_points().get('inventree_plugins', []):