Ejemplo n.º 1
0
def add():
    form = GroupForm()
    facade = Facade(form=form)
    if form.validate_on_submit():
        group = g.proxies.Groups.create(**form.data)
        facade['group_id'] = group['Group']['id']
        facade.successful = True
    return facade
Ejemplo n.º 2
0
def add():
    form = GroupForm()
    facade = Facade(form=form)
    if form.validate_on_submit():
        group = g.proxies.Groups.create(**form.data)
        facade['group_id'] = group['Group']['id']
        facade.successful = True
    return facade
Ejemplo n.º 3
0
def edit(group_id):
    form = GroupForm()
    facade = Facade(form=form)
    if form.validate_on_submit():
        group = g.proxies.Groups.update_group(group_id, **form.data)
        facade['group_id'] = group['Group']['group_id']
        facade.successful = True
    return facade
Ejemplo n.º 4
0
def edit(group_id):
    form = GroupForm()
    facade = Facade(form=form)
    if form.validate_on_submit():
        group = g.proxies.Groups.update_group(group_id, **form.data)
        facade['group_id'] = group['Group']['group_id']
        facade.successful = True
    return facade