1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from django.shortcuts import render_to_response, get_object_or_404
6 from django.template import RequestContext, Template
8 from infopages.models import InfoPage
11 def infopage(request, slug):
12 page = InfoPage.objects.get(slug=slug)
14 page = get_object_or_404(InfoPage, slug=slug)
15 rc = RequestContext(request)
16 left_column = Template(page.left_column).render(rc)
17 right_column = Template(page.right_column).render(rc)
19 return render_to_response('infopages/infopage.html', locals(),
20 context_instance=RequestContext(request))