From ffe9d6fe97c4429afcac050dc17a3a7ec1380952 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Tue, 13 Aug 2024 11:09:49 -0400 Subject: [PATCH] Fix adventure cards and serializers --- backend/server/adventures/serializers.py | 2 +- backend/server/users/serializers.py | 2 +- docker-compose.yml | 8 ++++---- frontend/src/lib/components/AdventureCard.svelte | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/server/adventures/serializers.py b/backend/server/adventures/serializers.py index 56be627b..1aeb75a8 100644 --- a/backend/server/adventures/serializers.py +++ b/backend/server/adventures/serializers.py @@ -13,7 +13,7 @@ def to_representation(self, instance): representation = super().to_representation(instance) if instance.image: public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/') - print(public_url) + #print(public_url) # remove any ' from the url public_url = public_url.replace("'", "") representation['image'] = f"{public_url}/media/{instance.image.name}" diff --git a/backend/server/users/serializers.py b/backend/server/users/serializers.py index b5ac703e..ad6f8d12 100644 --- a/backend/server/users/serializers.py +++ b/backend/server/users/serializers.py @@ -174,7 +174,7 @@ def to_representation(self, instance): representation = super().to_representation(instance) if instance.profile_pic: public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/') - print(public_url) + #print(public_url) # remove any ' from the url public_url = public_url.replace("'", "") representation['profile_pic'] = f"{public_url}/media/{instance.profile_pic.name}" diff --git a/docker-compose.yml b/docker-compose.yml index f4a195de..6c1ad505 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,8 @@ version: "3.9" services: web: - #build: ./frontend/ - image: ghcr.io/seanmorley15/adventurelog-frontend:latest + build: ./frontend/ + #image: ghcr.io/seanmorley15/adventurelog-frontend:latest environment: - PUBLIC_SERVER_URL=http://server:8000 - ORIGIN=http://localhost:8080 @@ -23,8 +23,8 @@ services: - postgres_data:/var/lib/postgresql/data/ server: - #build: ./backend/ - image: ghcr.io/seanmorley15/adventurelog-backend:latest + build: ./backend/ + #image: ghcr.io/seanmorley15/adventurelog-backend:latest environment: - PGHOST=db - PGDATABASE=database diff --git a/frontend/src/lib/components/AdventureCard.svelte b/frontend/src/lib/components/AdventureCard.svelte index 80532315..34d0a506 100644 --- a/frontend/src/lib/components/AdventureCard.svelte +++ b/frontend/src/lib/components/AdventureCard.svelte @@ -156,7 +156,7 @@