【发布时间】:2010-05-16 04:48:10
【问题描述】:
在我的 base.html 文件中,我使用的是{% if user.is_authenticated %}
<a href="#">{{user.username}}</a>
{% else %} <a href="/acc/login/">log in</a>
在这里,即使用户已登录,也会显示登录按钮。
现在当我点击log in 链接时,它会显示用户名以及正常的登录视图,表示用户已登录。
那么,怎么了?
【问题讨论】:
标签: django django-templates django-authentication