예제 #1
0
def delete_technology_group(technology, group_id):
    tech = get_technology_by_group(technology, group_id)

    db_session.delete(tech)
    db_session.commit()

    return tech
예제 #2
0
def delete_technology_group(technology, group_id):
    tech = get_technology_by_group(technology, group_id)

    db_session.delete(tech)
    db_session.commit()

    return tech
예제 #3
0
def add_technology_group(technology, group_id):
    tech = Technology(technology['technology'], technology['category'], \
                      technology['status'], group_id, technology['description'])

    db_session.add(tech)
    db_session.commit()

    return tech
예제 #4
0
def update_technology_group(technology, group_id):
    tech = get_technology_by_group(technology['technology'], group_id)
    tech.category = technology['category']
    tech.status = technology['status']
    tech.description = technology['description']
    db_session.commit()

    return tech
예제 #5
0
def add_technology_group(technology, group_id):
    tech = Technology(technology['technology'], technology['category'], \
                      technology['status'], group_id, technology['description'])

    db_session.add(tech)
    db_session.commit()

    return tech
예제 #6
0
def update_technology_group(technology, group_id):
    tech = get_technology_by_group(technology['technology'], group_id)
    tech.category = technology['category']
    tech.status = technology['status']
    tech.description = technology['description']
    db_session.commit()

    return tech
예제 #7
0
def delete_groups(group_name):
    group = Groups.query.filter_by(group=group_name).first()
    db_session.delete(group)
    db_session.commit()
    return group
예제 #8
0
def add_groups(groups):
    for group in groups:
        group_name = Groups(group.lower())
        db_session.add(group_name)
    db_session.commit()
    return groups
예제 #9
0
def delete_groups(group_name):
    group = Groups.query.filter_by(group=group_name).first()
    db_session.delete(group)
    db_session.commit()
    return group
예제 #10
0
def add_groups(groups):
    for group in groups:
        group_name = Groups(group.lower())
        db_session.add(group_name)
    db_session.commit()
    return groups