コード例 #1
0
def get_all_area(request):
    """

    :param request:
    :return:
    """
    res = function.get_all_area(request)
    return render_json(res)
コード例 #2
0
def add_area(request):
    """

    :param request:
    :return:
    """
    res = function.add_area(request)
    return render_json(res)
コード例 #3
0
def get_all_timezone(request):
    """

    :param request:
    :return:
    """
    res = function.get_all_timezone()
    return render_json(res)
コード例 #4
0
def test(request):
    """

    :param request:
    :return:
    """
    # 测试专用view
    res = function.check_jobday(1)
    return render_json(res)
コード例 #5
0
def del_area(request, name):
    """

    :param request:
    :param name:
    :return:
    """
    res = function.del_area(name)
    return render_json(res)
コード例 #6
0
def get_holiday(request, area):
    """

    :param request:
    :param area:
    :return:
    """
    days = function.get_holiday(request, area)
    return render_json(days)
コード例 #7
0
def addone(request):
    """

    :param request:
    :return:
    """
    try:
        function.addone(request)
        info = make_log_info(u'取消交易日', u'业务日志', u'Holiday',
                             sys._getframe().f_code.co_name,
                             request.user.username, '成功', '无')
    except Exception as e:
        info = make_log_info(u'取消交易日', u'业务日志', u'Holiday',
                             sys._getframe().f_code.co_name,
                             request.user.username, '失败', repr(e))
    add_log(info)
    return render_json('ok')
コード例 #8
0
def delall(request, area):
    """

    :param request:
    :param area:
    :return:
    """
    try:
        flag = function.delall(area)
        info = make_log_info(u'删除全部交易日', u'业务日志', u'Holiday',
                             sys._getframe().f_code.co_name,
                             request.user.username, '成功', '无')
    except Exception as e:
        info = make_log_info(u'删除全部交易日', u'业务日志', u'Holiday',
                             sys._getframe().f_code.co_name,
                             request.user.username, '失败', repr(e))
    add_log(info)
    return render_json(flag)