netsoc_admin.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:netsocadmin2 作者: UCCNetworkingSociety 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号