blob: 4b11c7bfd24cceb420f6e7197435859aa241950b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from django.shortcuts import render
from models import Event
def list_events(request):
"""Displays all events grouped by source.
"""
context = {
'events_source_import': Event.objects.filter(source=Event.SOURCE_IMPORT),
'events_source_admin': Event.objects.filter(source=Event.SOURCE_ADMIN),
}
return render(request, 'calendarium/list_events.html', context)
|