From cc25f57f7b88ad22a9b4d29fa53063c85bdca5d9 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Tue, 19 Dec 2017 10:31:20 +0100 Subject: [PATCH] Add UNAUTHENTICATED_USER = None note (#5679) When removing authentication entirely you cannot import `django.contrib.auth.models.AnonymousUser` Closes #3494 --- docs/api-guide/settings.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index a8abd2a63..caa065389 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -202,6 +202,8 @@ Default: `'version'` #### UNAUTHENTICATED_USER The class that should be used to initialize `request.user` for unauthenticated requests. +(If removing authentication entirely, e.g. by removing `django.contrib.auth` from +`INSTALLED_APPS`, set `UNAUTHENTICATED_USER` to `None`.) Default: `django.contrib.auth.models.AnonymousUser`