1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 12:59:36 +02:00

Fix admin page for adventure image

This commit is contained in:
Sean Morley 2024-09-24 17:05:16 -04:00
parent 86cefc8b2f
commit ad195911ff
3 changed files with 3 additions and 3 deletions

View file

@ -60,7 +60,7 @@ class AdventureImageAdmin(admin.ModelAdmin):
if obj.image:
public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/')
public_url = public_url.replace("'", "")
return mark_safe(f'<img src="{public_url}/media/{obj.profile_pic.name}" width="100px" height="100px"')
return mark_safe(f'<img src="{public_url}/media/{obj.image.name}" width="100px" height="100px"')
else:
return

View file

@ -8,7 +8,7 @@ from django_resized import ResizedImageField
ADVENTURE_TYPES = [
('general', 'General 🌍'),
('Outdoor', 'Outdoor 🏞️'),
('outdoor', 'Outdoor 🏞️'),
('lodging', 'Lodging 🛌'),
('dining', 'Dining 🍽️'),
('activity', 'Activity 🏄'),

View file

@ -219,7 +219,7 @@ export function continentCodeToString(code: string) {
export let ADVENTURE_TYPES = [
{ type: 'general', label: 'General 🌍' },
{ type: 'Outdoor', label: 'Outdoor 🏞️' },
{ type: 'outdoor', label: 'Outdoor 🏞️' },
{ type: 'lodging', label: 'Lodging 🛌' },
{ type: 'dining', label: 'Dining 🍽️' },
{ type: 'activity', label: 'Activity 🏄' },