work on logs, timetable, stats

This commit is contained in:
bkfox
2019-09-08 01:39:40 +02:00
parent 2d21ab2434
commit c68e21ee57
71 changed files with 19683 additions and 710 deletions

View File

@ -221,6 +221,7 @@ class Log(models.Model):
def related(self):
return self.diffusion or self.sound or self.track
# FIXME: required????
@property
def local_date(self):
"""
@ -230,6 +231,12 @@ class Log(models.Model):
"""
return tz.localtime(self.date, tz.get_current_timezone())
# prepare for the future on crash + ease the use in merged lists with
# diffusions
@property
def start(self):
return self.date
def __str__(self):
return '#{} ({}, {}, {})'.format(
self.pk, self.get_type_display(),