'Detect when user register/Login on Context Proccessor Django

I have to do some checks all the time with the context proccessor.The value must be 'True' as soon as the user logs in.But when navigating the site after logging in, the value should be 'False'. So it should be a one-time True result.I need to do this both for the login process and when registering.And I have to implement them with Context Proccessor in Django. How can I do that?

def user_info(request):
    ctx = dict()
    user = request.user
    ...
    ctx["isRegistered"] = False
    ctx["isLoggedIn"] = False
 
    # if user register website, that moment 'request' :   
    #      ctx["isRegistered"] = True
    
    return ctx


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source