forked from rc/aircox
work on logs, timetable, stats
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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(),
|
||||
|
Reference in New Issue
Block a user