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