show date on schedule day detail page

This commit is contained in:
Thomas Steen Rasmussen 2016-08-08 21:16:43 +02:00
parent c20e1e55cc
commit f8724b5be3
2 changed files with 2 additions and 1 deletions

View file

@ -1,7 +1,7 @@
{% extends 'program_base.html' %}
{% block program_content %}
<h2>{{ date|date:"I, F jS" }}</h2>
{% for event in events %}
{% ifchanged event.event_type %}
{% if not forloop.first %}</div>{% endif %}

View file

@ -64,6 +64,7 @@ class ProgramDayView(TemplateView):
day = int(kwargs['day'])
date = datetime.date(year=year, month=month, day=day)
day = Day.objects.filter(date=date)
context['date'] = date
context['events'] = models.Event.objects.filter(days=day).order_by('start', 'event_type')
context['event_types'] = models.EventType.objects.all()
context['days'] = Day.objects.filter(date__year=year)