Skip to main content

auth

Return context variables required by apps that use Django's authentication system.

If there is no 'user' attribute in the request, use AnonymousUser (from django.contrib.auth).

def auth(
request: HttpRequest
) - > dict

Return context variables required by apps that use Django's authentication system. If there is no 'user' attribute in the request, use AnonymousUser (from django.contrib.auth).

Parameters

NameTypeDescription
requestHttpRequestThe current Django request object used to retrieve the authenticated user or determine anonymity.

Returns

TypeDescription
dictA dictionary containing the 'user' object and a 'perms' permission wrapper for use in template rendering.