14 lines
376 B
Python
14 lines
376 B
Python
|
from django.shortcuts import render
|
||
|
|
||
|
|
||
|
from .models import Event
|
||
|
from ..page.models import Page
|
||
|
|
||
|
|
||
|
def index(request, slug=''):
|
||
|
context = {}
|
||
|
context['events'] = Event.objects.all().order_by('position')
|
||
|
context['postscript'] = Page.objects.get(slug='postscript')
|
||
|
context['intro'] = Page.objects.get(slug='intro')
|
||
|
return render(request, 'index.html', context)
|