summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2016-01-06 19:13:06 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2016-01-06 19:13:06 (GMT)
commita93a112e11aeeaa2aa7913318617f8c1ce97be32 (patch)
treecfe32e7fb7605f1b4c346bcb5ca332e27a6a789c /program
parent7f505ce017f7e28e4e3e7f55f26c425b1d1375a7 (diff)
cleaned-up URLs
Diffstat (limited to 'program')
-rw-r--r--program/urls.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/program/urls.py b/program/urls.py
index 49d0488..c125de3 100644
--- a/program/urls.py
+++ b/program/urls.py
@@ -9,19 +9,12 @@ from views import ShowListView, CurrentShowBoxView, RecommendationsListView, Rec
from models import Host, Show, TimeSlot
import os
-from datetime import date, datetime, timedelta
PROGRAM_SITE_MEDIA = os.path.join(os.path.dirname(__file__), '../site_media')
-now = datetime.now()
-end = now + timedelta(weeks=1)
-
-hosts = Host.objects.filter(Q(shows__programslots__until__gte=date.today()) |
- Q(always_visible=True)).distinct()
-shows = Show.objects.filter(programslots__until__gt=date.today()).exclude(id=1).distinct()
+hosts = Host.objects.filter(Q(is_active=True) | Q(always_visible=True)).distinct()
+shows = Show.objects.filter(is_active=True).exclude(id=1).distinct()
timeslots = TimeSlot.objects.all()
-recommendations = TimeSlot.objects.filter(Q(note__isnull=False, note__status=1, start__range=(now, end)) |
- Q(show__broadcastformat__slug='sondersendung', start__range=(now, end))).order_by('start')[:20]
urlpatterns = patterns('',
url(r'^today/?$', DayScheduleView.as_view()),