()
Create users
Create users
Create users
def create_users():
    """ Create users """

    # Create all tables
    db.create_all()

    # Adding roles
    admin_role = find_or_create_role('admin', u'Admin')

    # Add users
    user = find_or_create_user(u'Admin', u'Example', u'admin@example.com', 'Password1', admin_role)
    user = find_or_create_user(u'Member', u'Example', u'member@example.com', 'Password1')

    # Save to DB
    db.session.commit()
def create_users ( ) : # Create all tables db . create_all ( ) # Adding roles admin_role = find_or_create_role ( 'admin' , u'Admin' ) # Add users user = find_or_create_user ( u'Admin' , u'Example' , u'admin@example.com' , 'Password1' , admin_role ) user = find_or_create_user ( u'Member' , u'Example' , u'member@example.com' , 'Password1' ) # Save to DB db . session . commit ( )