summaryrefslogtreecommitdiff
path: root/sublab_project/calendarium/views.py
blob: 5646e03ce825b8fe302b45583c19e58b70e17050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from django.shortcuts import render

from calendarium.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)