From 2bf7deb4ca26f79ac6a035aec48bcfe6b934d5fb Mon Sep 17 00:00:00 2001 From: Niko Abeler Date: Thu, 24 Aug 2023 21:15:37 +0200 Subject: [PATCH] fixes + ordering --- guild/models.py | 1 + guild/templates/guild/character_detail.html | 9 +++++---- guild_journal/settings/production.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/guild/models.py b/guild/models.py index f448f2b..c7248a9 100644 --- a/guild/models.py +++ b/guild/models.py @@ -101,6 +101,7 @@ class Character(models.Model): class Meta: verbose_name = _("character") verbose_name_plural = _("characters") + ordering = ["name"] def __str__(self): return self.name diff --git a/guild/templates/guild/character_detail.html b/guild/templates/guild/character_detail.html index c16cfe1..7a8ecf0 100644 --- a/guild/templates/guild/character_detail.html +++ b/guild/templates/guild/character_detail.html @@ -29,10 +29,11 @@
- - - - + {% if character.picture %} + + + + {% endif %}

{{character.description|md|safe}}

diff --git a/guild_journal/settings/production.py b/guild_journal/settings/production.py index 7965783..21acc47 100644 --- a/guild_journal/settings/production.py +++ b/guild_journal/settings/production.py @@ -7,7 +7,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent.parent SECRET_KEY = "django-insecure-e*p%e)pwf+-ntt4wpn-^^7-0yq)!cjo*om18vy77-=*c0jjfqa" # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = os.environ.get("DJANGO_HOST").split(",") CSRF_TRUSTED_ORIGINS = [ @@ -25,5 +25,5 @@ DATABASES = { } } -EDIA_ROOT = "/data/media" +MEDIA_ROOT = "/data/media" MEDIA_URL = "/media/"