From 82a30b60f190533a002b912d899bb2376871bdf7 Mon Sep 17 00:00:00 2001 From: "Martin J. Laubach" Date: Tue, 20 Aug 2024 12:50:48 +0100 Subject: [PATCH] Fix docs example, User.is_authenticated has been changed to a bool some time ago --- docs/page.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/page.rst b/docs/page.rst index 38da9e052..18e19c94d 100644 --- a/docs/page.rst +++ b/docs/page.rst @@ -291,7 +291,7 @@ This allows for various actions dependent on page and request, for example a simple user access check can be implemented like this:: def authenticated_request_processor(page, request): - if not request.user.is_authenticated(): + if not request.user.is_authenticated: raise django.core.exceptions.PermissionDenied Page.register_request_processor(authenticated_request_processor)