ficus-tracker/app/utils.py
def authorize(login, password, user=None):
    """ Return true if user credentials correct """
    if not user:
        user = User.query.filter_by(login=login).first()

    if user:
        return user.check_password(password)
    else:
        return False
 Return true if user credentials correct 
Return true if user credentials correct
Return true if user credentials correct
def authorize(login, password, user=None):
    if not user:
        user = User.query.filter_by(login=login).first()
    if user:
        return user.check_password(password)
    else:
        return False
def authorize ( login , password , user = None ) : if not user : user = User . query . filter_by ( login = login ) . first ( ) if user : return user . check_password ( password ) else : return False
Return true if user credentials correct
Return true if user credentials correct
""" Return true if user credentials correct """
login
password
user