Home
Sign Up
Sign In
V2EX
›
问与答
flask request
luofan004
·
Oct 25, 2018
· 1525 views
This topic created in 2783 days ago, the information mentioned may be changed or developed.
大佬些,我用 flask 的时候感觉老代码 if else 判断逻辑太多,想在 blueprint 注册同名函数,然后通过 flask 的 before_request 把对应的老的 url 请求的 endpoint 直接更改为 蓝图的 endpoint,即 blue.func , 然后让这个请求直接运行蓝图里面对应的函数,但是 request 对象不允许直接赋值 endpoint 属性(注:我不想用 redirect ( url_for)重定向,想让用户 0 感知, 跟以前一样),求大佬指点
flask
endpoint
request
函数
1 replies
1
luofan004
OP
Oct 25, 2018
已解决~~
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
2824 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 157ms ·
UTC 15:19
·
PVG 23:19
·
LAX 08:19
·
JFK 11:19
♥ Do have faith in what you're doing.
❯