【发布时间】:2022-01-24 18:26:28
【问题描述】:
当用户点击登录按钮时,它应该运行一个python文件,这是一个检查用户登录信息的程序。 我对编码和 html 很陌生,所以我不太确定它是否可能。 代码
from flask import Blueprint
auth = Blueprint("auth", __name__)
@auth.route('/login')
def login():
return "<p>Login</p>"
#Here is where I'd like to run the python script
@auth.route('/logout')
def logout():
return "<p>Logout</p>"
【问题讨论】: