Ejemplo n.º 1
0
def ntvu_get_department_data_view(request):
    """
    URL[GET]:/data/ntvu/get_department_data/
    """
    key = get_para_from_request_safe(request, 'key')
    if not is_valid_request(key):
        return error_response('无效的请求!')

    ret_data = ntvu_get_department_data()
    return success_response(ret_data)
Ejemplo n.º 2
0
def ntvu_get_course_data_view(request):
    """
    URL[GET]:/data/ntvu/get_course_data/
    PARA:
    key
    year
    term
    """
    key = get_para_from_request_safe(request, 'key')
    year = get_para_from_request_safe(request, 'year')
    term = get_para_from_request_safe(request, 'term')

    if not is_valid_request(key):
        return error_response('无效的请求!')

    ret_data = ntvu_get_course_data(year, term)
    return success_response(ret_data)