From 458402fb8b3c6975211c362a5102085dcbab78d9 Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Mon, 19 Feb 2024 22:42:09 +0100 Subject: [PATCH] nominate display fix --- playlist/models/track.py | 6 +----- playlist/templates/Banter.html | 13 ------------- playlist/templates/Nominate.html | 12 +++++------- 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 playlist/templates/Banter.html diff --git a/playlist/models/track.py b/playlist/models/track.py index 5d9241b..eb0b74d 100644 --- a/playlist/models/track.py +++ b/playlist/models/track.py @@ -10,15 +10,11 @@ class TrackManager(models.Manager): class Track(models.Model): def __str__(self): - s = f"'{self. id} | {self.name}'" + s = f"'{self.name}'" if self.artists.count() > 0: artists = list(map(lambda a:a.name, self.artists.all())) s += " door " s += " & ".join(artists) - dup = self.is_duplicate_of() - #dup = None - if dup: - s += f" !! Is een duplicaat van {dup.id}" return s @property def artist(self): diff --git a/playlist/templates/Banter.html b/playlist/templates/Banter.html deleted file mode 100644 index 4cb3b6e..0000000 --- a/playlist/templates/Banter.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load static %} -
- {% include "Popup.html" with body=track.banter title=track img="img/draakje/draakje-headphones3.gif" %} -
- diff --git a/playlist/templates/Nominate.html b/playlist/templates/Nominate.html index 196af88..7e9856e 100644 --- a/playlist/templates/Nominate.html +++ b/playlist/templates/Nominate.html @@ -6,17 +6,15 @@ Nomineren {% block main-content %} {% if warning %} -
{{warning}}
-{% endif %} -{% if error %} -
{{error}}
+
{{nominated}}: {{warning}}
+{% elif error %} +
{{nominated}}: {{error}}
+{% elif nominated %} +
{{nominated}} Genomineerd!
{% endif %}
{% csrf_token %}
-{% if nominated %} -{% include "Banter.html" with track=nominated %} -{% endif %} {% endblock %}