diff --git a/README.md b/README.md index fc88383..b85904e 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ When programming for openIMIS backend, you are highly encouraged to use the feat - within `openimis-be_py` directory - install openIMIS (external) dependencies: `pip install -r requirements.txt`. For development workstations, one can use `pip install -r dev-requirements.txt` instead, for more modules. - In the script directory, - - generate the openIMIS modules dependencies file (from openimis.json config): `python modules-requirements.py openimis.json > modules-requirements.txt` + - generate the openIMIS modules dependencies file (from openimis.json config): `python modules-requirements.py ../openimis.json > modules-requirements.txt` - if you previously installed openIMIS on another version, it seems safe to uninstall all previous modules-requirement to be sure it match current version `pip uninstall -r modules-requirements.txt` - install openIMIS current modules: `pip install -r modules-requirements.txt` - Copy the example environment setup and adjust the settings (like database connection): `cp .env.example .env`. diff --git a/openIMIS/openIMIS/settings/base.py b/openIMIS/openIMIS/settings/base.py index cdab026..2ba3f76 100644 --- a/openIMIS/openIMIS/settings/base.py +++ b/openIMIS/openIMIS/settings/base.py @@ -4,6 +4,7 @@ import json import logging import os +import sys from ..openimisapps import openimis_apps, get_locale_folders from datetime import timedelta @@ -194,3 +195,5 @@ def SITE_URL(): # By default, the maximum upload size is 2.5Mb, which is a bit short for base64 picture upload DATA_UPLOAD_MAX_MEMORY_SIZE = int(os.environ.get('DATA_UPLOAD_MAX_MEMORY_SIZE', 10 * 1024 * 1024)) + +IS_UNIT_TEST_ENV = 'test' in sys.argv