Пример #1
0
def hbwe_get_classroom_data_view(request):
    """
    URL[GET]:/data/hbwe/hbwe_get_classroom_data/
    PARA:
    key
    year_str
    """
    key = get_para_from_request_safe(request, 'key')
    if not is_valid_request(key):
        return error_response('无效的请求!')

    year = get_para_from_request_safe(request, 'year')
    term = get_para_from_request_safe(request, 'term')

    ret_data = hbwe_get_classroom_data(year, term)
    return success_response(ret_data)
Пример #2
0
def dlu_get_course_data_view(request):
    """
    URL[GET]:/data/dlu/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 = dlu_get_course_data(year, term)
    return success_response(ret_data)