diff --git a/aircox/admin_site.py b/aircox/admin_site.py index 7e9ad63..ad189d8 100644 --- a/aircox/admin_site.py +++ b/aircox/admin_site.py @@ -30,7 +30,7 @@ class AdminSite(admin.AdminSite): 'programs': Program.objects.active().values('pk', 'title') \ .order_by('title'), # today's diffusions - 'diffusions': Diffusion.objects.on_air().date().order_by('start') \ + 'diffusions': Diffusion.objects.date().order_by('start') \ .select_related('episode'), # TODO: only for dashboard # last comments diff --git a/aircox/models/episode.py b/aircox/models/episode.py index 6cb5928..f16ed57 100644 --- a/aircox/models/episode.py +++ b/aircox/models/episode.py @@ -252,7 +252,7 @@ class Diffusion(BaseRerun): return self.type == self.TYPE_ON_AIR and \ self.start <= now and self.end >= now - # TODO: property? + @property def is_live(self): """ True if Diffusion is live (False if there are sounds files). """ return self.type == self.TYPE_ON_AIR and \ diff --git a/aircox/templates/admin/index.html b/aircox/templates/admin/index.html index d3c7bd6..e6b80a0 100644 --- a/aircox/templates/admin/index.html +++ b/aircox/templates/admin/index.html @@ -16,7 +16,31 @@