From b0274709992d88e80a3efc017223f6a730defbd4 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Thu, 5 Dec 2024 22:00:55 +0100 Subject: [PATCH] Another htmx fix --- wger/gallery/models/image.py | 6 ++++++ wger/gallery/templates/images/overview.html | 20 +++++++++++++++----- wger/gallery/views/images.py | 2 ++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/wger/gallery/models/image.py b/wger/gallery/models/image.py index bcafd2920..cca02d53b 100644 --- a/wger/gallery/models/image.py +++ b/wger/gallery/models/image.py @@ -67,6 +67,12 @@ class Meta: blank=True, ) + def __str__(self): + """ + Return a more human-readable representation + """ + return f'Gallery image #{self.pk}' + def get_owner_object(self): """ Returns the object that has owner information diff --git a/wger/gallery/templates/images/overview.html b/wger/gallery/templates/images/overview.html index 2355d5ea0..631b7ab32 100644 --- a/wger/gallery/templates/images/overview.html +++ b/wger/gallery/templates/images/overview.html @@ -15,13 +15,14 @@