work on cms

This commit is contained in:
bkfox
2016-05-21 01:01:17 +02:00
parent 54910f4df9
commit a4f1b03bde
6 changed files with 126 additions and 88 deletions

View File

@ -12,7 +12,7 @@ This application defines all base models and basic control of them. We have:
## Architecture
A Station is basically an object that represent a radio station. On each station, we use the Program object, that is declined in two different type:
A Station is basically an object that represent a radio station. On each station, we use the Program object, that is declined in two different types:
* **Scheduled**: the diffusion is based on a timetable and planified through one Schedule or more; Diffusion object represent the occurrence of these programs;
* **Streamed**: the diffusion is based on random playlist, used to fill gaps between the programs;

View File

@ -690,9 +690,9 @@ class Diffusion (models.Model):
super().save(*args, **kwargs)
def __str__ (self):
return '#' + str(self.pk) + ' ' + self.program.name + ', ' + \
self.date.strftime('%Y-%m-%d %H:%M') +\
'' # FIXME str(self.type_display)
return '{self.program.name} {date} #{self.pk}'.format(
self=self, date=self.date.strftime('%Y-%m-%d %H:%M')
)
class Meta:
verbose_name = _('Diffusion')