mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-08 00:08:49 +00:00
More environment variables for config.yaml
This commit is contained in:
parent
3381945e14
commit
47a93bc4cb
@ -409,7 +409,7 @@ reqiured_keys = ['ENGINE', 'NAME']
|
|||||||
|
|
||||||
for key in reqiured_keys:
|
for key in reqiured_keys:
|
||||||
if key not in db_config:
|
if key not in db_config:
|
||||||
error_msg = f'Missing required database configuration value {key} in config.yaml'
|
error_msg = f'Missing required database configuration value {key}'
|
||||||
logger.error(error_msg)
|
logger.error(error_msg)
|
||||||
|
|
||||||
print('Error: ' + error_msg)
|
print('Error: ' + error_msg)
|
||||||
@ -503,7 +503,10 @@ LOCALE_PATHS = (
|
|||||||
os.path.join(BASE_DIR, 'locale/'),
|
os.path.join(BASE_DIR, 'locale/'),
|
||||||
)
|
)
|
||||||
|
|
||||||
TIME_ZONE = CONFIG.get('timezone', 'UTC')
|
TIME_ZONE = get_setting(
|
||||||
|
'INVENTREE_TIMEZONE',
|
||||||
|
CONFIG.get('timezone', 'UTC')
|
||||||
|
)
|
||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ language: en-us
|
|||||||
# System time-zone (default is UTC)
|
# System time-zone (default is UTC)
|
||||||
# Reference: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
# Reference: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
# Select an option from the "TZ database name" column
|
# Select an option from the "TZ database name" column
|
||||||
|
# Use the environment variable INVENTREE_TIMEZONE
|
||||||
timezone: UTC
|
timezone: UTC
|
||||||
|
|
||||||
# List of currencies supported by default.
|
# List of currencies supported by default.
|
||||||
@ -63,6 +64,7 @@ currencies:
|
|||||||
- USD
|
- USD
|
||||||
|
|
||||||
# Set debug to False to run in production mode
|
# Set debug to False to run in production mode
|
||||||
|
# Use the environment variable INVENTREE_DEBUG
|
||||||
debug: True
|
debug: True
|
||||||
|
|
||||||
# Set debug_toolbar to True to enable a debugging toolbar for InvenTree
|
# Set debug_toolbar to True to enable a debugging toolbar for InvenTree
|
||||||
@ -71,6 +73,7 @@ debug: True
|
|||||||
debug_toolbar: False
|
debug_toolbar: False
|
||||||
|
|
||||||
# Configure the system logging level
|
# Configure the system logging level
|
||||||
|
# Use environment variable INVENTREE_LOG_LEVEL
|
||||||
# Options: DEBUG / INFO / WARNING / ERROR / CRITICAL
|
# Options: DEBUG / INFO / WARNING / ERROR / CRITICAL
|
||||||
log_level: WARNING
|
log_level: WARNING
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user