From c8ae3f3e402ca38e2d755061125ab570aef842cb Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Fri, 12 Feb 2016 19:45:47 +0100 Subject: added is_ diff --git a/program/models.py b/program/models.py index 11ec7f1..db82377 100644 --- a/program/models.py +++ b/program/models.py @@ -210,7 +210,7 @@ class MusicFocus(models.Model): class Host(models.Model): name = models.CharField(_("Name"), max_length=128) - always_visible = models.BooleanField(_("Always visible"), default=False) + is_always_visible = models.BooleanField(_("Is always visible"), default=False) is_active = models.BooleanField(_("Is active"), default=True, editable=False) email = models.EmailField(_("E-Mail"), blank=True) website = models.URLField(_("Website"), blank=True) diff --git a/program/views.py b/program/views.py index dcfaca9..3248507 100644 --- a/program/views.py +++ b/program/views.py @@ -15,13 +15,13 @@ from program.utils import tofirstdayinisoweek class HostListView(ListView): context_object_name = 'host_list' - queryset = Host.objects.filter(Q(is_active=True) | Q(always_visible=True)).distinct() + queryset = Host.objects.filter(Q(is_active=True) | Q(is_always_visible=True)).distinct() template_name = 'host_list.html' class HostDetailView(DetailView): context_object_name = 'host' - queryset = Host.objects.filter(Q(is_active=True) | Q(always_visible=True)).distinct() + queryset = Host.objects.filter(Q(is_active=True) | Q(is_always_visible=True)).distinct() template_name = 'host_detail.html' -- cgit v0.10.2