PTT
Submit
Submit
選擇語言
正體中文
简体中文
PTT
Python
[問題] django view and templates
作者:
sean72
(.)
2016-03-15 07:10:35
tutorial
https://thinkster.io/django-angularjs-tutorial
github
https://github.com/brwr/thinkster-django-angular
在templates/navbar.html裡面
他用變數user.is_authenticated 來切換navbar按鈕
請問在authentication/view.py 裡面
他是如何產生變數 user 並且放在context然後return response?
我隱約覺得這跟django built-in authentication User Class有關聯
但是卻不清楚template裡面的user是怎麼從view.py傳出來的
謝謝大家解答
作者:
Dforce
(VF-17)
2016-03-15 08:55:00
https://goo.gl/SdFxMp
request.user.is_authenticated()django.short.render(request,template_name,dictionary)
作者:
uranusjr
(â†é€™äººæ˜¯è¶…級笨蛋)
2016-03-15 14:58:00
來自 django.contrib.auth.context_processors.auth這個叫 context processor, 詳細解釋請參照文件
繼續閱讀
[問題] lxml遇到<br /> 該如何處理?
girl5566
[問題] 爬蟲 jsp網頁 亂碼
aaa7513231
[問題] matplotlib在數據下積分
sam122094
Re: [問題] 模組路徑
Neisseria
[問題] 模組路徑
lihsianglin
[問題] 排序多個 dict 的集合
zha0
Re: [問題] 有關於寫檔及取代問題
justfor0223
Re: [問題] 有關於寫檔及取代問題
Neisseria
[問題] 有關於寫檔及取代問題
justfor0223
Re: [問題] 比較並取代字串的文字
iyaicharles
Links
booklink
Contact Us: admin [ a t ] ucptt.com