def generate_sample(): db.query(User).delete() users = [ User(email='*****@*****.**', password='******'), User(email='*****@*****.**', password='******'), User(email='*****@*****.**', password='******'), ] db.add_all(users)
def get_users(): '''Return users.''' users = db.query(User).order_by(User.id).all() return users