flask反向解析url_for

#反向解析 #根據視圖函數名生成網址 #需要導入 from flask import url_for #視圖不帶參數 @myApp.route(’/red3/’) def red3(): # 藍圖對象.函數名 url=url_for(‘myApp.red4’) return redirect(url) @myApp.route(’/red5/’) def red4(): return ‘raziy
相關文章
相關標籤/搜索