def admin_constraints(request): """ Way to apply changes :param request: :return: """ post_dict = dict(request.POST) action = post_dict.get('action')[0] id = post_dict.get('id')[0] schema = post_dict.get('schema')[0] table = post_dict.get('table')[0] print('action: ' + action) print('id: ' + id) if 'deny' in action: actions.remove_queued_constraint(id) elif 'apply' in action: actions.apply_queued_constraint(id) return redirect("/dataedit/view/{schema}/{table}".format(schema=schema, table=table))
def admin_constraints(request): """ Way to apply changes :param request: :return: """ post_dict = dict(request.POST) action = post_dict.get("action")[0] id = post_dict.get("id")[0] schema = post_dict.get("schema")[0] table = post_dict.get("table")[0] print("action: " + action) print("id: " + id) if "deny" in action: actions.remove_queued_constraint(id) elif "apply" in action: actions.apply_queued_constraint(id) return redirect("/dataedit/view/{schema}/{table}".format(schema=schema, table=table))