nominate display fix
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{% load static %}
|
||||
<div
|
||||
id="banter"
|
||||
{% if not track.banter_done %}
|
||||
hx-get="{% url 'track-banter' track.id %}"
|
||||
hx-trigger="load delay:{% if track.banter %}500ms{% else %}5s{% endif %}"
|
||||
{% endif %}
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#banter"
|
||||
>
|
||||
{% include "Popup.html" with body=track.banter title=track img="img/draakje/draakje-headphones3.gif" %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,17 +6,15 @@ Nomineren
|
||||
|
||||
{% block main-content %}
|
||||
{% if warning %}
|
||||
<div class="info warning">{{warning}}</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="info error">{{error}}</div>
|
||||
<div class="info warning">{{nominated}}: {{warning}}</div>
|
||||
{% elif error %}
|
||||
<div class="info error">{{nominated}}: {{error}}</div>
|
||||
{% elif nominated %}
|
||||
<div class="info">{{nominated}} Genomineerd!</div>
|
||||
{% endif %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="text" name="spotify_link" placeholder="Spotify-link">
|
||||
<input type="submit" value="OK">
|
||||
</form>
|
||||
{% if nominated %}
|
||||
{% include "Banter.html" with track=nominated %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user