Re: AnonymousUser.is_authenticated woes

2018-10-11 Thread Stefan Bethke
Am 11.10.2018 um 18:44 schrieb Stefan Bethke mailto:s...@lassitu.de>>: from django.contrib.auth.models import AnonymousUser AnonymousUser.is_authenticated > The answer is of course to use an instance, not the class: >>> from django.contrib.auth.models import AnonymousUser >>> u = Anony

Re: AnonymousUser.is_authenticated woes

2018-10-11 Thread Simon Charette
Django 1.11 correctly returns a callable on AnonymouUser.is_authenticated accesses. https://github.com/django/django/blob/bd197d3f927f6d17fc4738366126e06c6a95f366/django/contrib/auth/models.py#L448-L450 This was changed in Django 2.0 after a deprecation period of a few releases https://github.c

Re: AnonymousUser.is_authenticated woes

2018-10-11 Thread Simon Charette
Are you sure you are using Django 1.11? What does ./run.sh manage --version yields? User/AnonymousUser was made a property in Django 2.0+ which I assume your version of Django CMS is not compatible with. Best, Simon Le jeudi 11 octobre 2018 14:26:27 UTC-4, Stefan Bethke a écrit : > > First tim

Re: AnonymousUser.is_authenticated woes

2018-10-11 Thread Markus Holtermann
Hi Stefan, You need to remove the parentheses `()` after `is_authenticated`. Markus On Thu, Oct 11, 2018, at 6:44 PM, Stefan Bethke wrote: > First time poster here, > > I'm currently working on some unit tests of my Django app, and I'm > running into a issue with is_authenticated. > > I'm usi

AnonymousUser.is_authenticated woes

2018-10-11 Thread Stefan Bethke
First time poster here, I'm currently working on some unit tests of my Django app, and I'm running into a issue with is_authenticated. I'm using Django 1.11.16 and Django CMS 3.5.2. While trying to work with Django CMS menus, I get: File "/usr/local/lib/python3.6/site-packages/menus/menu_poo