Merge branch 'development' of https://github.com/WDI-Ideas/goodtimes into development

This commit is contained in:
rizwanisready
2024-05-24 12:29:27 +05:30
3 changed files with 7 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ from logging.handlers import TimedRotatingFileHandler
DEBUG = False
ALLOWED_HOSTS = ["goodtimes.betadelivery.com", "154.41.254.33"]
ALLOWED_HOSTS = ["admin.goodtimesltd.co.uk", "77.68.29.148"]
LOGGING_DIR = os.path.join(
@@ -61,7 +61,7 @@ LOGGING = {
}
BASE_DOMAIN = "https://goodtimes.betadelivery.com"
BASE_DOMAIN = "https://admin.goodtimesltd.co.uk"
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/

View File

@@ -6,7 +6,7 @@ import colorlog
# from logging.handlers import TimedRotatingFileHandler
DEBUG = False
ALLOWED_HOSTS = ["127.0.0.1", "77.68.8.229", "staging.goodtimesltd.co.uk"]
ALLOWED_HOSTS = ["staging.goodtimesltd.co.uk", "77.68.8.229"]
# LOGGING_DIR = os.path.join(
@@ -60,7 +60,7 @@ ALLOWED_HOSTS = ["127.0.0.1", "77.68.8.229", "staging.goodtimesltd.co.uk"]
# },
# }
# BASE_DOMAIN = "https://goodtimes.betadelivery.com"
BASE_DOMAIN = "https://staging.goodtimesltd.co.uk"
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/

View File

@@ -2,7 +2,8 @@ import logging
from threading import Thread
# Configure logging at the beginning of your application
logging.basicConfig(level=logging.INFO, filename='app.log', filemode='a', format='%(name)s - %(levelname)s - %(message)s')
# logging.basicConfig(level=logging.INFO, filename='app.log', filemode='a', format='%(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
def send_email_async(email_service):
try:
@@ -11,6 +12,6 @@ def send_email_async(email_service):
except Exception as e:
# Log the exception
print(f"Failed to send email: {e}")
logging.error(f"Failed to send email: {e}")
logger.error(f"Failed to send email: {e}")
# Optionally, you could use other means to notify you of the failure,
# such as sending an alert to an admin email, or using a monitoring service.