From e0e6dbac944ce777ad4437782eb4792742ee9323 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 6 Jan 2022 12:15:33 +1100 Subject: [PATCH] Add PLUGIN_FILE to settings.py --- InvenTree/InvenTree/settings.py | 7 +++++++ requirements.txt | 1 + 2 files changed, 8 insertions(+) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index ba2808a8dd..e811028ccc 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -89,6 +89,13 @@ with open(cfg_filename, 'r') as cfg: # We will place any config files in the same directory as the config file config_dir = os.path.dirname(cfg_filename) +# Check if the plugin.txt file (specifying required plugins) is specified +PLUGIN_FILE = os.getenv('INVENTREE_PLUGIN_FILE') + +if not PLUGIN_FILE: + # If not specified, look in the same directory as the configuration file + PLUGIN_FILE = os.path.join(config_dir, 'plugins.txt') + # Default action is to run the system in Debug mode # SECURITY WARNING: don't run with debug turned on in production! DEBUG = _is_true(get_setting( diff --git a/requirements.txt b/requirements.txt index d6405bb7bc..a150ae503a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,6 +33,7 @@ flake8==3.8.3 # PEP checking gunicorn>=20.1.0 # Gunicorn web server importlib_metadata # Backport for importlib.metadata inventree # Install the latest version of the InvenTree API python library +invoke>=1.6.0 # Invoke management tool (must be installed in venv) markdown==3.3.4 # Force particular version of markdown pep8-naming==0.11.1 # PEP naming convention extension pillow==8.3.2 # Image manipulation