Home
Sign Up
Sign In
V2EX
›
问与答
flask request
luofan004
·
Oct 25, 2018
· 1819 views
This topic created in 2962 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
luofan004
OP
Oct 25, 2018
1
已解决~~
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4295 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms ·
UTC 07:10
·
PVG 15:10
·
LAX 23:10
·
JFK 02:10
♥ Do have faith in what you're doing.
❯