main.py 文件源码

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

项目:stalkerGKSU 作者: zense 项目源码 文件源码
def query():
    if(request.method == 'POST'):
        organisation = request.form['organisation']
        email_address = request.form['email_address']
        filename = organisation + ".html"
        info = db.session.query(User.github_username, User.name).filter_by(organisation = organisation).all()
        if(info == []):
            job = q.enqueue_call(
                func="main.save_info", args=(organisation, email_address, ), result_ttl=5000, timeout=600
            )
            flash("We shall notify you at " + email_address + " when the processing is complete")
        else:
            lists = []
            for i in info:
                lists.append([str(i.github_username), str(i.name)])
            get_nodes.creating_objs(lists, organisation)
            return render_template(filename, organisation=str(organisation)+'.json')
    return render_template('query.html')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号