今天用Flask-Login時,遇到了一個問題,顯示為:
{%if current_user.is_authenticated()%} 'bool' object has no attribute 'call'
查找了解決方案為:
current_user.is_authenticated" instead of "current_user.is_authenticated()"
但是不知道為什么這么做就沒問題。
具體連接為:
https://github.com/lingthio/Flask-User-starter-app/issues/9
記錄問題,以后明白了再來補充答案。
Flask之 bool object has no attribute '__call__'問題
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
推薦閱讀更多精彩內容
- 22年12月更新:個人網站關停,如果仍舊對舊教程有興趣參考 Github 的markdown內容[https://...
- 最近在學習flask,用到flask-login,發現網上只有0.1版本的中文文檔,看了官方已經0.4了,并且添加...
- Correctness AdapterViewChildren Summary: AdapterViews can...
- Quickstart http://flask.pocoo.org/docs/0.12/quickstart/ Q...