Some pycodestyle cleanups

Signed-off-by: Michael Moese <mmoese@suse.com>
pull/1/head
Michael Moese 4 years ago
parent 9b6798a180
commit 5884e192f2

@ -9,26 +9,31 @@ app.config['FLATPAGES_EXTENSION'] = '.md'
pages = FlatPages(app)
@app.route('/<path:path>.html')
def page(path):
page = pages.get_or_404(path)
return render_template('page.html', page=page)
@app.route('/verein.html')
def verein():
return render_template('verein.html')
@app.route('/impressum.html')
def impressum():
return render_template('impressum.html')
@app.route('/')
@app.route('/index.html')
def index():
posts = [p for p in pages if "date" in p.meta]
sorted_pages = sorted(posts, reverse=True, key=lambda page:
sorted_pages = sorted(posts, reverse=True, key=lambda page
datetime.strptime(page.meta["date"], "%d %b %y"))
return render_template('index.html', pages=sorted_pages)
if __name__ == '__main__':
app.run(host='0.0.0.0')

Loading…
Cancel
Save