class models.AnonymousUser
django.contrib.auth.models.AnonymousUser is a class that implements the django.contrib.auth.models.User interface, with these differences:
-
id is always
None. -
usernameis always the empty string. -
get_username()always returns the empty string. -
is_anonymousisTrueinstead ofFalse. -
is_authenticatedisFalseinstead ofTrue. -
is_staffandis_superuserare alwaysFalse. -
is_activeis alwaysFalse. -
groupsanduser_permissionsare always empty. -
set_password(),check_password(),save()anddelete()raiseNotImplementedError.
In practice, you probably won’t need to use AnonymousUser objects on your own, but they’re used by Web requests, as explained in the next section.
Please login to continue.