2012-06-20 19 views

回答

3

在Django中的is_authenticated()總是返回TrueUser情況下,始終返回FalseAnonymousUser實例。它與用戶名/密碼/電子郵件無關,並且django-email-as-username不會更改此行爲。

見Django的source code

# In User class line 279 
def is_authenticated(self): 
    """ 
    Always return True. This is a way to tell if the user has been 
    authenticated in templates. 
    """ 
    return True 
+0

哦..大..謝謝Secator – Soask

相關問題