1. 程式人生 > >flask 報錯 AttributeError: module 'Include.route' has no attribute 'name'

flask 報錯 AttributeError: module 'Include.route' has no attribute 'name'

bsp clu info mod 圖片 聲明 技術 導入 error:

技術分享圖片

代碼如圖:

技術分享圖片

技術分享圖片

後來發現,是要把模塊下的 聲明的 Blueprint() 對象導入

導入進去就行了

技術分享圖片

或者把導包方式修改為:

技術分享圖片

flask 報錯 AttributeError: module 'Include.route' has no attribute 'name'