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:
parent
86cefc8b2f
commit
ad195911ff
3 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ class AdventureImageAdmin(admin.ModelAdmin):
|
||||||
if obj.image:
|
if obj.image:
|
||||||
public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/')
|
public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/')
|
||||||
public_url = public_url.replace("'", "")
|
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:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ from django_resized import ResizedImageField
|
||||||
|
|
||||||
ADVENTURE_TYPES = [
|
ADVENTURE_TYPES = [
|
||||||
('general', 'General 🌍'),
|
('general', 'General 🌍'),
|
||||||
('Outdoor', 'Outdoor 🏞️'),
|
('outdoor', 'Outdoor 🏞️'),
|
||||||
('lodging', 'Lodging 🛌'),
|
('lodging', 'Lodging 🛌'),
|
||||||
('dining', 'Dining 🍽️'),
|
('dining', 'Dining 🍽️'),
|
||||||
('activity', 'Activity 🏄'),
|
('activity', 'Activity 🏄'),
|
||||||
|
|
|
@ -219,7 +219,7 @@ export function continentCodeToString(code: string) {
|
||||||
|
|
||||||
export let ADVENTURE_TYPES = [
|
export let ADVENTURE_TYPES = [
|
||||||
{ type: 'general', label: 'General 🌍' },
|
{ type: 'general', label: 'General 🌍' },
|
||||||
{ type: 'Outdoor', label: 'Outdoor 🏞️' },
|
{ type: 'outdoor', label: 'Outdoor 🏞️' },
|
||||||
{ type: 'lodging', label: 'Lodging 🛌' },
|
{ type: 'lodging', label: 'Lodging 🛌' },
|
||||||
{ type: 'dining', label: 'Dining 🍽️' },
|
{ type: 'dining', label: 'Dining 🍽️' },
|
||||||
{ type: 'activity', label: 'Activity 🏄' },
|
{ type: 'activity', label: 'Activity 🏄' },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue