Am 11.10.2018 um 18:44 schrieb Stefan Bethke <s...@lassitu.de 
<mailto:s...@lassitu.de>>:
>>>> from django.contrib.auth.models import AnonymousUser
>>>> AnonymousUser.is_authenticated
> <property object at 0x7fb8c93878b8>

The answer is of course to use an instance, not the class:

>>> from django.contrib.auth.models import AnonymousUser
>>> u = AnonymousUser()
>>> u.is_authenticated
CallableBool(False)
>>> u.is_authenticated()
False
>>> bool(u.is_authenticated)
False

Doh!

Sorry for wasting all of yours time.


Stefan

-- 
Stefan Bethke <s...@lassitu.de <mailto:s...@lassitu.de>>   Fon +49 151 14070811 
<tel:+49%20151%2014070811>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/F7189F5A-9579-4661-BD1E-C3297391F74C%40lassitu.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to