diff --git a/goodtimes/settings/development.py b/goodtimes/settings/development.py index f362626..f33f818 100644 --- a/goodtimes/settings/development.py +++ b/goodtimes/settings/development.py @@ -56,3 +56,5 @@ STATICFILES_DIRS = [BASE_DIR.joinpath("static")] STRIPE_CHECKOUT_URL = "http://localhost:8000/subscriptions/stripe-subscription/" STRIPE_FINAL_URL = "http://localhost:8000/subscriptions/create-checkout-session/" + +LOGO_PATH = "static" diff --git a/goodtimes/settings/production.py b/goodtimes/settings/production.py index 6675744..c3ed2bf 100644 --- a/goodtimes/settings/production.py +++ b/goodtimes/settings/production.py @@ -82,3 +82,5 @@ STRIPE_CHECKOUT_URL = ( STRIPE_FINAL_URL = ( "https://admin.goodtimesltd.co.uk/subscriptions/create-checkout-session/" ) + +LOGO_PATH = "/var/www/goodtimes_prod/goodtimes/static" diff --git a/goodtimes/settings/staging.py b/goodtimes/settings/staging.py index 0ecc8f2..315c495 100644 --- a/goodtimes/settings/staging.py +++ b/goodtimes/settings/staging.py @@ -73,8 +73,8 @@ MEDIA_ROOT = os.path.join(BASE_DIR, "media") STATIC_URL = "/static/" -# STATICFILES_DIRS = [BASE_DIR.joinpath("static")] -STATICFILES_DIRS = os.path.join(BASE_DIR, "static") +STATICFILES_DIRS = [BASE_DIR.joinpath("static")] + STRIPE_CHECKOUT_URL = ( "https://staging.goodtimesltd.co.uk/subscriptions/stripe-subscription/" @@ -83,3 +83,4 @@ STRIPE_FINAL_URL = ( "https://staging.goodtimesltd.co.uk/subscriptions/create-checkout-session/" ) +LOGO_PATH = "/var/www/goodtimes/static" diff --git a/manage_events/report.py b/manage_events/report.py index 0ebce15..fbc94b0 100644 --- a/manage_events/report.py +++ b/manage_events/report.py @@ -158,7 +158,9 @@ def generate_event_report_pdf_three(user, report_data): ) # Insert company logo - logo_path = os.path.join("static/images/icon.png") # Path to the logo + logo_path = settings.LOGO_PATH + print("logo_path: ", logo_path) + logo_path = os.path.join(str(logo_path), "images/icon.png") # Path to the logo logo = Image(logo_path) logo.drawWidth = 200 # Adjust the width as needed logo.drawHeight = 300 # Adjust the height as needed