(request: HttpRequest)
https://github.com/django/django/blob/6e99585c19290fb9bec502cac8210041fdb28484/django/contrib/auth/__init__.py#L134-L148
https://github.com/django/django/blob/6e99585c19290fb9bec502cac8210041fdb28484/django/contrib/auth/__init__.py#L134-L148
https : // github . com / django / django / blob / 6e99585c19290fb9bec502cac8210041fdb28484 / django / contrib / auth / __init__ . py#L134 - L148
def logout(request: HttpRequest) -> None:
    """
    https://github.com/django/django/blob/6e99585c19290fb9bec502cac8210041fdb28484/django/contrib/auth/__init__.py#L134-L148
    """
    request.session.flush()
    request.user = AnonymousUser()
def logout ( request : HttpRequest ) -> None : request . session . flush ( ) request . user = AnonymousUser ( )