def login(username, password): """ find wether the user exist in the database :param username: username :param password: password :return: True if the user and password are all corrected, False, if one of them is not correct """ return UserDao.login(username, password)
from db.user_dao import UserDao print(UserDao.login("admin", "123456")) r = UserDao.search_user_role("admin") print(r)