Django 1.10: User.is_authenticated is now a property

This commit is contained in:
Raphael Michel
2016-09-27 10:25:20 +02:00
parent fbd1c0d367
commit 3e318d0dcf
6 changed files with 11 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ class PermissionMiddleware(MiddlewareMixin):
return redirect(urljoin(settings.SITE_URL, request.get_full_path()))
if url_name in self.EXCEPTIONS:
return
if not request.user.is_authenticated():
if not request.user.is_authenticated:
# Taken from django/contrib/auth/decorators.py
path = request.build_absolute_uri()
# urlparse chokes on lazy objects in Python 3, force to str