-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: align ee settings to include huey (#1448)
* Align EE settings * Fix languages
- Loading branch information
Showing
1 changed file
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,7 @@ def set_ciso_assistant_url(_, __, event_dict): | |
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = os.environ.get("DJANGO_DEBUG", "False") == "True" | ||
MAIL_DEBUG = os.environ.get("MAIL_DEBUG", "False") == "True" | ||
|
||
logger.info("DEBUG mode: %s", DEBUG) | ||
logger.info("CISO_ASSISTANT_URL: %s", CISO_ASSISTANT_URL) | ||
|
@@ -157,6 +158,7 @@ def set_ciso_assistant_url(_, __, event_dict): | |
"allauth.socialaccount", | ||
"allauth.socialaccount.providers.saml", | ||
"allauth.mfa", | ||
"huey.contrib.djhuey", | ||
] | ||
|
||
MIDDLEWARE = [ | ||
|
@@ -308,9 +310,16 @@ def set_ciso_assistant_url(_, __, event_dict): | |
("es", "Spanish"), | ||
("de", "German"), | ||
("it", "Italian"), | ||
("nd", "Dutch"), | ||
("nl", "Dutch"), | ||
("pl", "Polish"), | ||
("pt", "Portuguese"), | ||
("ar", "Arabic"), | ||
("ro", "Romanian"), | ||
("hi", "Hindi"), | ||
("ur", "Urdu"), | ||
("cs", "Czech"), | ||
("sv", "Swedish"), | ||
("id", "Indonesian"), | ||
] | ||
|
||
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
|
@@ -339,6 +348,7 @@ def set_ciso_assistant_url(_, __, event_dict): | |
"PASSWORD": os.environ["POSTGRES_PASSWORD"], | ||
"HOST": os.environ["DB_HOST"], | ||
"PORT": os.environ.get("DB_PORT", "5432"), | ||
"CONN_MAX_AGE": os.environ.get("CONN_MAX_AGE", 300), | ||
} | ||
} | ||
else: | ||
|
@@ -427,3 +437,19 @@ def set_ciso_assistant_url(_, __, event_dict): | |
logger.info("License information", seats=LICENSE_SEATS, expiration=LICENSE_EXPIRATION) | ||
|
||
INSTALLED_APPS.append("enterprise_core") | ||
|
||
if MAIL_DEBUG: | ||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" | ||
DEFAULT_FROM_EMAIL = "[email protected]" | ||
|
||
|
||
## Huey settings | ||
HUEY_FILE_PATH = os.environ.get("HUEY_FILE_PATH", BASE_DIR / "db" / "huey.db") | ||
|
||
HUEY = { | ||
"huey_class": "huey.SqliteHuey", | ||
"name": "ciso_assistant", | ||
"filename": HUEY_FILE_PATH, | ||
"results": True, # would be interesting for debug | ||
"immediate": False, # set to False to run in "live" mode regardless of DEBUG, otherwise it will follow | ||
} |