示例#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