mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
Fix adventure cards and serializers
This commit is contained in:
parent
5aef1eb8bd
commit
ffe9d6fe97
4 changed files with 7 additions and 7 deletions
|
@ -13,7 +13,7 @@ class AdventureSerializer(serializers.ModelSerializer):
|
|||
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}"
|
||||
|
|
|
@ -174,7 +174,7 @@ class CustomUserDetailsSerializer(UserDetailsSerializer):
|
|||
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}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
<div class="flex justify-between">
|
||||
<button
|
||||
on:click={() => goto(`/adventures/${adventure.id}`)}
|
||||
class="text-2xl font-semibold -mt-2 break-words text-wrap hover:underline"
|
||||
class="text-2xl font-semibold -mt-2 break-words text-wrap hover:underline text-left"
|
||||
>
|
||||
{adventure.name}
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue