files¶
Module: espressodb.management.utilities.files
|
Reads the settings file for given project and performs checks. |
|
Reads the db settings file for given project and performs checks. |
Root directory of the EspressoDB installation |
Functions for identifying files relevant for EspressoDB.
-
get_db_config
(root_dir)[source]¶ Reads the db settings file for given project and performs checks.
Expects to find the keys
ENGINE
andNAME
.- Parameters
root_dir (
str
) – The root directory of the project.- Return type
Dict
[str
,str
]- Returns
Database settings found in settings file.
- Raises
ImproperlyConfigured – If not all of the essential keys are set.
-
get_project_settings
(root_dir)[source]¶ Reads the settings file for given project and performs checks.
Expects to find the keys
SECRET_KEY
,DEBUG
,ALLOWED_HOSTS
andPROJECT_APPS
.- Parameters
root_dir (
str
) – The root directory of the project.- Return type
Dict
[str
,Any
]- Returns
Settings found in settings file.
- Raises
ImproperlyConfigured – If not all of the essential keys are set.
-
ESPRESSO_DB_ROOT
= 'path/to/espressodb'¶ Root directory of the EspressoDB installation