Exemplo n.º 1
0
def add_Variable(request):

    variable = Variable()
    variable.name = request.POST["variable_name"]
    variable.group = request.POST["variable_group"]
    DBSession.add(variable)
    DBSession.flush()

    return {"variable": "ok"}
Exemplo n.º 2
0
def create_variable(
    variable_name=undefined,
    variable_group=undefined,
):
    variable = Variable()
    variable.name = variable_name
    variable.group = variable_group
    DBSession.add(variable)
    DBSession.flush()

    return variable