当我输入/login网址时,它将出错
/login
例如:
from flask import Flask ,url_for,render_template,request app = Flask(__name__) @app.route('/login') def index(): return "index" if __name__== "__main__": app.run()
错误结果是这样的:
Not Found. The requested URL was not found on the server.
当我/login用/login/或替换为时/log,会没事的。怎么发生的?
/login/
/log
请阅读flask快速入门中的 唯一URL /重定向行为,