def check_auth ( email , password ) : try : user = User . get ( User . email == email ) except User . DoesNotExist : return False return password == user . password
python how to check if email and password exist
Check if a username / password combination is valid .
def check_auth(email, password):
    """Check if a username/password combination is valid.
    """
    try:
        user = User.get(User.email == email)
    except User.DoesNotExist:
        return False
    return password == user.password