In django login, we can type if request.user.is_authenticated to check if the user is logged in.
But if we want to check the login status of a particular user by entering the username, we get the following:
#Python
def checkLoginStatus(username):
#do some checks here....
return True or False