diff --git a/app/event/views.py b/app/event/views.py index 2166164..eb9dede 100644 --- a/app/event/views.py +++ b/app/event/views.py @@ -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)