def tutorials():
"""
Route: /tutorials
This route will render the tutorials page. Note that the markdown tutorial
files are read when the application starts-up.
"""
global TUTORIALS
if flask.request.method != "GET":
return flask.abort(400)
if len(TUTORIALS) == 0:
return flask.render_template("tutorials.html",
show_logout_button=l.is_logged_in(),
error="No tutorials to show")
if DEBUG:
TUTORIALS = []
populate_tutorials()
return flask.render_template("tutorials.html",
show_logout_button=l.is_logged_in(),
tutorials=TUTORIALS)
评论列表
文章目录