From: Frédéric Péters Date: Mon, 6 Jan 2020 15:28:51 +0000 (+0100) Subject: add string representation for jingles X-Git-Tag: v2021~257 X-Git-Url: https://git.0d.be/?p=django-panik-nonstop.git;a=commitdiff_plain;h=34c631222964508719a012466e48855c590e87de add string representation for jingles --- 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