Beispiel #1
0
def static_page(slug):
    """docstring for static_page"""
    page = Page.get_by_slug(slug)
    if page:
        response = make_response(render_template('page.html', page=page))
        response.headers['Last-Modified'] = page.updated_at.strftime('%a, %d %b %Y %H:%M:%S GMT')
        return response
    else:
        return render_template('404.html'), 404