From 34c631222964508719a012466e48855c590e87de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 6 Jan 2020 16:28:51 +0100 Subject: [PATCH] add string representation for jingles --- nonstop/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nonstop/models.py b/nonstop/models.py index d78dee0..f87c3d6 100644 --- a/nonstop/models.py +++ b/nonstop/models.py @@ -160,6 +160,9 @@ class Jingle(models.Model): filepath = models.CharField(_('File Path'), max_length=255) duration = models.DurationField(_('Duration'), null=True, blank=True) + def __str__(self): + return self.label + class Stream(models.Model): class Meta: @@ -181,6 +184,3 @@ class StreamedDiffusion(models.Model): diffusion = models.ForeignKey('emissions.Diffusion') jingle = models.ForeignKey(Jingle, null=True, blank=True) stream = models.ForeignKey(Stream) - - def __str__(self): - return self.label -- 2.39.2