From 2126660d9b2e1d8f33010faa90a7821937bbb2bc Mon Sep 17 00:00:00 2001 From: rizwanisready Date: Wed, 5 Jun 2024 19:47:48 +0530 Subject: [PATCH 1/3] report problem 3 --- goodtimes/settings/development.py | 2 ++ goodtimes/settings/production.py | 2 ++ goodtimes/settings/staging.py | 5 +++-- manage_events/report.py | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/goodtimes/settings/development.py b/goodtimes/settings/development.py index f362626..5846cde 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/images" \ No newline at end of file diff --git a/goodtimes/settings/production.py b/goodtimes/settings/production.py index 6675744..5460bca 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/images" \ No newline at end of file diff --git a/goodtimes/settings/staging.py b/goodtimes/settings/staging.py index 0ecc8f2..440e5ba 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/images" diff --git a/manage_events/report.py b/manage_events/report.py index 0ebce15..9273c0a 100644 --- a/manage_events/report.py +++ b/manage_events/report.py @@ -158,7 +158,8 @@ 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 + logo_path = os.path.join(str(logo_path), "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 From 59a9a5eb989e199cd0417be19e4c56b7069677ec Mon Sep 17 00:00:00 2001 From: rizwanisready Date: Wed, 5 Jun 2024 19:48:48 +0530 Subject: [PATCH 2/3] report problem 4 --- manage_events/report.py | 1 + 1 file changed, 1 insertion(+) diff --git a/manage_events/report.py b/manage_events/report.py index 9273c0a..85b70b9 100644 --- a/manage_events/report.py +++ b/manage_events/report.py @@ -159,6 +159,7 @@ def generate_event_report_pdf_three(user, report_data): # Insert company logo logo_path = settings.LOGO_PATH + print("logo_path: ", logo_path) logo_path = os.path.join(str(logo_path), "icon.png") # Path to the logo logo = Image(logo_path) logo.drawWidth = 200 # Adjust the width as needed From e6ca0c5c71d4f6cc81886e6113a1f0fe20cf6706 Mon Sep 17 00:00:00 2001 From: rizwanisready Date: Wed, 5 Jun 2024 19:54:40 +0530 Subject: [PATCH 3/3] report problem 5 --- goodtimes/settings/development.py | 2 +- goodtimes/settings/production.py | 2 +- goodtimes/settings/staging.py | 2 +- manage_events/report.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/goodtimes/settings/development.py b/goodtimes/settings/development.py index 5846cde..f33f818 100644 --- a/goodtimes/settings/development.py +++ b/goodtimes/settings/development.py @@ -57,4 +57,4 @@ 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/images" \ No newline at end of file +LOGO_PATH = "static" diff --git a/goodtimes/settings/production.py b/goodtimes/settings/production.py index 5460bca..c3ed2bf 100644 --- a/goodtimes/settings/production.py +++ b/goodtimes/settings/production.py @@ -83,4 +83,4 @@ STRIPE_FINAL_URL = ( "https://admin.goodtimesltd.co.uk/subscriptions/create-checkout-session/" ) -LOGO_PATH = "/var/www/goodtimes_prod/goodtimes/static/images" \ No newline at end of file +LOGO_PATH = "/var/www/goodtimes_prod/goodtimes/static" diff --git a/goodtimes/settings/staging.py b/goodtimes/settings/staging.py index 440e5ba..315c495 100644 --- a/goodtimes/settings/staging.py +++ b/goodtimes/settings/staging.py @@ -83,4 +83,4 @@ STRIPE_FINAL_URL = ( "https://staging.goodtimesltd.co.uk/subscriptions/create-checkout-session/" ) -LOGO_PATH = "/var/www/goodtimes/static/images" +LOGO_PATH = "/var/www/goodtimes/static" diff --git a/manage_events/report.py b/manage_events/report.py index 85b70b9..fbc94b0 100644 --- a/manage_events/report.py +++ b/manage_events/report.py @@ -160,7 +160,7 @@ def generate_event_report_pdf_three(user, report_data): # Insert company logo logo_path = settings.LOGO_PATH print("logo_path: ", logo_path) - logo_path = os.path.join(str(logo_path), "icon.png") # Path to the logo + 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