From: Guillaume Pellerin Date: Wed, 6 Dec 2023 10:49:34 +0000 (+0100) Subject: fix DEBUG mode and email backend X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0ecec372940096e41d45f3cac0ff716b35bd51e5;p=teleforma.git fix DEBUG mode and email backend --- diff --git a/app/settings.py b/app/settings.py index 3252c255..fc55e496 100644 --- a/app/settings.py +++ b/app/settings.py @@ -11,7 +11,8 @@ from django.urls import reverse_lazy sys.dont_write_bytecode = True -DEBUG = True +DEBUG = True if os.environ.get('DEBUG') == 'True' else False + TEMPLATE_DEBUG = DEBUG DEBUG_TOOLBAR = False @@ -257,6 +258,8 @@ SERVER_EMAIL = 'crfpa@pre-barreau.com' EMAIL_SUBJECT_PREFIX = '[' + TELEMETA_ORGANIZATION + '] ' if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' +else: + EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" POSTMAN_AUTO_MODERATE_AS = True POSTMAN_DISALLOW_ANONYMOUS = True