From 8dc3a2ba98ca138bcda04c5216368db9b6b5bd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 11:50:14 +0200 Subject: [PATCH] =?UTF-8?q?Odstran=C4=9B=C5=88o=20star=C3=A9=20testov?= =?UTF-8?q?=C3=A1n=C3=AD=20e-mail=C5=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- korektury/views.py | 7 ------- mamweb/settings_common.py | 4 ---- mamweb/settings_prod.py | 1 - mamweb/settings_test.py | 1 - seminar/models/tvorba.py | 3 --- 5 files changed, 16 deletions(-) diff --git a/korektury/views.py b/korektury/views.py index d5066af8..ee6f2841 100644 --- a/korektury/views.py +++ b/korektury/views.py @@ -194,13 +194,6 @@ class KorekturyView(generic.TemplateView): if email: emails.discard(email) - if not settings.POSLI_MAILOVOU_NOTIFIKACI: - print("Poslal bych upozornění na tyto adresy: ", " ".join(emails)) - print("---- Upozornění:") - print(text) - print("---- Konec upozornění") - return - EmailMessage( subject=subject, body=text, diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 4bc713c8..f737be1e 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -342,10 +342,6 @@ KOREKTURY_IMG_DIR = os.path.join('korektury', 'img') CISLO_IMG_DIR = os.path.join('cislo', 'img') -# E-MAIL NOTIFICATIONS -POSLI_MAILOVOU_NOTIFIKACI = False - - # Logování chyb class InvalidTemplateVariable(str): diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index 7d9c99e9..4a3f2198 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -68,5 +68,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/ # E-MAIL NOTIFICATIONS -POSLI_MAILOVOU_NOTIFIKACI = True LOCAL_TEST_PROD = "prod" diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index 83c08b92..71f166ed 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -72,7 +72,6 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/ FILE_UPLOAD_PERMISSIONS = 0o440 # Testování e-mailů -POSLI_MAILOVOU_NOTIFIKACI = True EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend' # TODO Pouze na otestování testu… Zvolit konferu! # XXX: Je to pole, protože implementační detail backendu. diff --git a/seminar/models/tvorba.py b/seminar/models/tvorba.py index 209008f5..36157c96 100644 --- a/seminar/models/tvorba.py +++ b/seminar/models/tvorba.py @@ -284,9 +284,6 @@ class Cislo(SeminarModelBase): def posli(subject, text, resitele): emaily = map(lambda resitel: resitel.osoba.email, resitele) - if not settings.POSLI_MAILOVOU_NOTIFIKACI: - print("Poslal bych upozornění na tyto adresy: ", " ".join(emaily)) - return email = EmailMessage( subject=subject,