diff options
author | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2011-07-24 17:12:29 (GMT) |
---|---|---|
committer | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2011-07-24 17:12:29 (GMT) |
commit | 55a4c77108fc018f481487dc4574d41ced9c6689 (patch) | |
tree | 08ec6c6dd64fa37b5b1b8e391e1f6b86572a6b72 /program/urls.py | |
parent | 032354875c1e7142c3fbcc917fb3c644e5fa415d (diff) |
limited shows and host to active ones.
Diffstat (limited to 'program/urls.py')
-rw-r--r-- | program/urls.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/program/urls.py b/program/urls.py index 0f643d7..8ec547d 100644 --- a/program/urls.py +++ b/program/urls.py @@ -1,17 +1,18 @@ from django.conf import settings from django.conf.urls.defaults import * - from django.views.generic.list_detail import object_detail, object_list from models import Host, Show, TimeSlot from views import current_show, day_schedule, recommendations, show_list, week_schedule +from datetime import date + hosts_dict = { - 'queryset': Host.objects.all(), + 'queryset': Host.objects.filter(shows__programslots__until__gte=date.today()).distinct(), 'template_object_name': 'host' } shows_dict = { - 'queryset': Show.objects.all(), + 'queryset': Show.objects.filter(programslots__until__gt=date.today()).exclude(id=1).distinct(), 'template_object_name': 'show' } timeslots_dict = { |