Commit d33fe145 authored by fred's avatar fred
Browse files

add string representation of a schedule

parent fe485b5f
......@@ -131,6 +131,10 @@ class Diffusion(models.Model):
episode = models.ForeignKey('Episode', verbose_name=u'Episode')
datetime = models.DateTimeField()
def __unicode__(self):
return u'%s at %02d:%02d' % (self.episode.title, self.datetime.hour,
self.datetime.minute)
def get_sound_path(instance, filename):
return os.path.join('sounds', instance.episode.emission.slug,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment