create context pages

This commit is contained in:
j 2021-11-12 18:03:19 +00:00
parent 3be7b7cd5e
commit 05413ad9f8

View file

@ -9,6 +9,6 @@ def index(request, slug=''):
context = {}
context['settings'] = settings
context['events'] = Event.objects.all().order_by('position')
context['postscript'] = Page.objects.get(slug='postscript')
context['intro'] = Page.objects.get(slug='intro')
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)