Ejemplo n.º 1
0
def createUser(login_session):
    User1 = User(name=login_session['username'],
                 email=login_session['email'])
    session.add(User1)
    session.commit()
    user = session.query(User).filter_by(email=login_session['email']).one()
    return user.id
Ejemplo n.º 2
0
def createUser(login_session):
    ''' User Helper Functions '''
    U1 = User(name=login_session['username'],
              email=login_session['email'],
              picture=login_session['picture'])
    session.add(U1)
    session.commit()
    user = session.query(User).filter_by(email=login_session['email']).one()
    return user.id