diff --git a/korektury/views.py b/korektury/views.py index 3b34c654..47f281d1 100644 --- a/korektury/views.py +++ b/korektury/views.py @@ -195,13 +195,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 13cf1098..ac161a16 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -343,10 +343,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_local.py b/mamweb/settings_local.py index 4d98cd38..cb992015 100644 --- a/mamweb/settings_local.py +++ b/mamweb/settings_local.py @@ -102,5 +102,5 @@ LOGGING = { # E-maily posílat chceme, ale do terminálu :-) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' -SEND_EMAIL_NOTIFICATIONS = True + LOCAL_TEST_PROD = "local" diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index c9bc95f0..22aac97c 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -63,7 +63,4 @@ LOGGING['loggers']['django.security.csrf']['level'] = 'ERROR' LOGGING['handlers']['registration_logfile']['filename'] = '/home/mam-web/logs/prod/registration.log' LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/prod/registration_errors.log' - -# E-MAIL NOTIFICATIONS -POSLI_MAILOVOU_NOTIFIKACI = True LOCAL_TEST_PROD = "prod" diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index ad5988b4..6d394b04 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -70,7 +70,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/tvorba/models.py b/tvorba/models.py index 2a5cec7f..e5bdabcf 100644 --- a/tvorba/models.py +++ b/tvorba/models.py @@ -290,9 +290,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,