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