diff --git a/goodtimes/settings/production.py b/goodtimes/settings/production.py index b2413da..6675744 100644 --- a/goodtimes/settings/production.py +++ b/goodtimes/settings/production.py @@ -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/ @@ -77,8 +77,8 @@ STATIC_URL = "/static/" STATICFILES_DIRS = [BASE_DIR.joinpath("static")] STRIPE_CHECKOUT_URL = ( - "https://staging.goodtimesltd.co.uk/subscriptions/stripe-subscription/" + "https://admin.goodtimesltd.co.uk/subscriptions/stripe-subscription/" ) STRIPE_FINAL_URL = ( - "https://staging.goodtimesltd.co.uk/subscriptions/create-checkout-session/" + "https://admin.goodtimesltd.co.uk/subscriptions/create-checkout-session/" ) diff --git a/goodtimes/settings/staging.py b/goodtimes/settings/staging.py index 7d4d773..c3aa480 100644 --- a/goodtimes/settings/staging.py +++ b/goodtimes/settings/staging.py @@ -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/ diff --git a/manage_communications/utils.py b/manage_communications/utils.py index 1c7f74a..a9edfd2 100644 --- a/manage_communications/utils.py +++ b/manage_communications/utils.py @@ -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. \ No newline at end of file