Skip to content
Snippets Groups Projects
Commit a93a112e authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

cleaned-up URLs

parent 7f505ce0
No related branches found
No related tags found
No related merge requests found
...@@ -9,19 +9,12 @@ from views import ShowListView, CurrentShowBoxView, RecommendationsListView, Rec ...@@ -9,19 +9,12 @@ from views import ShowListView, CurrentShowBoxView, RecommendationsListView, Rec
from models import Host, Show, TimeSlot from models import Host, Show, TimeSlot
import os import os
from datetime import date, datetime, timedelta
PROGRAM_SITE_MEDIA = os.path.join(os.path.dirname(__file__), '../site_media') PROGRAM_SITE_MEDIA = os.path.join(os.path.dirname(__file__), '../site_media')
now = datetime.now() hosts = Host.objects.filter(Q(is_active=True) | Q(always_visible=True)).distinct()
end = now + timedelta(weeks=1) shows = Show.objects.filter(is_active=True).exclude(id=1).distinct()
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()
timeslots = TimeSlot.objects.all() 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('', urlpatterns = patterns('',
url(r'^today/?$', DayScheduleView.as_view()), url(r'^today/?$', DayScheduleView.as_view()),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment