(user: User, request: HttpRequest)
https://github.com/django/django/blob/6e99585c19290fb9bec502cac8210041fdb28484/django/contrib/auth/__init__.py#L86-L131
https://github.com/django/django/blob/6e99585c19290fb9bec502cac8210041fdb28484/django/contrib/auth/__init__.py#L86-L131
https : // github . com / django / django / blob / 6e99585c19290fb9bec502cac8210041fdb28484 / django / contrib / auth / __init__ . py#L86 - L131
def login(user: User, request: HttpRequest) -> None:
    """
    https://github.com/django/django/blob/6e99585c19290fb9bec502cac8210041fdb28484/django/contrib/auth/__init__.py#L86-L131
    """
    request.session["user_id"] = str(user.id)
    request.user = user
def login ( user : User , request : HttpRequest ) -> None : request . session [ "user_id" ] = str ( user . id ) request . user = user