Example #1
0
def admin_columns(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_column(id)
    elif 'apply' in action:
        actions.apply_queued_column(id)

    return redirect("/dataedit/view/{schema}/{table}".format(schema=schema,
                                                             table=table))
Example #2
0
def admin_columns(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_column(id)
    elif "apply" in action:
        actions.apply_queued_column(id)

    return redirect("/dataedit/view/{schema}/{table}".format(schema=schema,
                                                             table=table))