def create_variable(name, increase_permission="admin"): variable = Variable() variable.name = name variable.increase_permission = increase_permission DBSession.add(variable) DBSession.flush() return variable
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"}
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