From 74280d40c18fa6f02d947769822ec21325645dac Mon Sep 17 00:00:00 2001 From: petermaksymo Date: Mon, 20 Dec 2021 14:22:33 -0500 Subject: [PATCH] replaced default admin email to admin@example.com --- Dockerfile | 2 +- docker-compose.yml | 2 +- docs/configuration.md | 2 +- ihatemoney/conf-templates/ihatemoney.cfg.j2 | 2 +- ihatemoney/default_settings.py | 2 +- ihatemoney/tests/ihatemoney.cfg | 2 +- ihatemoney/tests/ihatemoney_envvar.cfg | 2 +- ihatemoney/tests/main_test.py | 2 +- ihatemoney/utils.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index fee3cfaf..cbd3a4a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ENV DEBUG="False" \ ALLOW_PUBLIC_PROJECT_CREATION="True" \ BABEL_DEFAULT_TIMEZONE="UTC" \ GREENLET_TEST_CPP="no" \ - MAIL_DEFAULT_SENDER="('Budget manager', 'admin@email.com')" \ + MAIL_DEFAULT_SENDER="('Budget manager', 'admin@example.com')" \ MAIL_PASSWORD="" \ MAIL_PORT="25" \ MAIL_SERVER="localhost" \ diff --git a/docker-compose.yml b/docker-compose.yml index c5c16878..40c7ed21 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: - ALLOW_PUBLIC_PROJECT_CREATION=True - BABEL_DEFAULT_TIMEZONE=UTC - GREENLET_TEST_CPP=no - - MAIL_DEFAULT_SENDER=('Budget manager', 'admin@email.com') + - MAIL_DEFAULT_SENDER=('Budget manager', 'admin@example.com') - MAIL_PASSWORD= - MAIL_PORT=25 - MAIL_SERVER=localhost diff --git a/docs/configuration.md b/docs/configuration.md index 8303dabf..40149d6e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -79,7 +79,7 @@ for details. A python tuple describing the name and email address to use when sending emails. -- **Default value:** `("Budget manager", "admin@email.com")` +- **Default value:** `("Budget manager", "admin@example.com")` - **Production value:** Any tuple you want. ## SHOW_ADMIN_EMAIL diff --git a/ihatemoney/conf-templates/ihatemoney.cfg.j2 b/ihatemoney/conf-templates/ihatemoney.cfg.j2 index 5ea549e4..8538a206 100644 --- a/ihatemoney/conf-templates/ihatemoney.cfg.j2 +++ b/ihatemoney/conf-templates/ihatemoney.cfg.j2 @@ -19,7 +19,7 @@ SQLALCHEMY_TRACK_MODIFICATIONS = False SECRET_KEY = "{{ secret_key }}" # A python tuple describing the name and email adress of the sender of the mails. -MAIL_DEFAULT_SENDER = ("Budget manager", "admin@email.com") # CUSTOMIZE +MAIL_DEFAULT_SENDER = ("Budget manager", "admin@example.com") # CUSTOMIZE # A boolean that determines whether the admin email (MAIL_DEFAULT_SENDER) is # shown in error messages. diff --git a/ihatemoney/default_settings.py b/ihatemoney/default_settings.py index eaf77ecb..46265f5c 100644 --- a/ihatemoney/default_settings.py +++ b/ihatemoney/default_settings.py @@ -3,7 +3,7 @@ DEBUG = SQLACHEMY_ECHO = False SQLALCHEMY_DATABASE_URI = "sqlite:////tmp/ihatemoney.db" SQLALCHEMY_TRACK_MODIFICATIONS = False SECRET_KEY = "tralala" -MAIL_DEFAULT_SENDER = ("Budget manager", "admin@email.com") +MAIL_DEFAULT_SENDER = ("Budget manager", "admin@example.com") SHOW_ADMIN_EMAIL = True ACTIVATE_DEMO_PROJECT = True ADMIN_PASSWORD = "" diff --git a/ihatemoney/tests/ihatemoney.cfg b/ihatemoney/tests/ihatemoney.cfg index 1fe52e5c..0d2b7368 100644 --- a/ihatemoney/tests/ihatemoney.cfg +++ b/ihatemoney/tests/ihatemoney.cfg @@ -6,4 +6,4 @@ SQLACHEMY_ECHO = DEBUG SECRET_KEY = "supersecret" -MAIL_DEFAULT_SENDER = ("Budget manager", "admin@email.com") +MAIL_DEFAULT_SENDER = ("Budget manager", "admin@example.com") diff --git a/ihatemoney/tests/ihatemoney_envvar.cfg b/ihatemoney/tests/ihatemoney_envvar.cfg index 9517047d..4790bd2c 100644 --- a/ihatemoney/tests/ihatemoney_envvar.cfg +++ b/ihatemoney/tests/ihatemoney_envvar.cfg @@ -6,4 +6,4 @@ SQLACHEMY_ECHO = DEBUG SECRET_KEY = "lalatra" -MAIL_DEFAULT_SENDER = ("Budget manager", "admin@email.com") +MAIL_DEFAULT_SENDER = ("Budget manager", "admin@example.com") diff --git a/ihatemoney/tests/main_test.py b/ihatemoney/tests/main_test.py index af8a334a..57322bca 100644 --- a/ihatemoney/tests/main_test.py +++ b/ihatemoney/tests/main_test.py @@ -26,7 +26,7 @@ class ConfigurationTestCase(BaseTestCase): self.assertFalse(self.app.config["SQLALCHEMY_TRACK_MODIFICATIONS"]) self.assertEqual( self.app.config["MAIL_DEFAULT_SENDER"], - ("Budget manager", "admin@email.com"), + ("Budget manager", "admin@example.com"), ) self.assertTrue(self.app.config["ACTIVATE_DEMO_PROJECT"]) self.assertTrue(self.app.config["ALLOW_PUBLIC_PROJECT_CREATION"]) diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py index bc063f2d..d5739fa7 100644 --- a/ihatemoney/utils.py +++ b/ihatemoney/utils.py @@ -56,7 +56,7 @@ def flash_email_error(error_message, category="danger"): error_extension = "." if ( admin_email - and admin_email[1] != "admin@email.com" + and admin_email[1] != "admin@example.com" and current_app.config.get("SHOW_ADMIN_EMAIL") ): error_extension = " or contact the administrator at {}.".format(admin_email[1])