示例#1
0
def send_monitor_counts(request, course):
    stats = Stats(course)
    encoded = json.dumps(stats.monitor_counts())
    response = HttpResponse(encoded, content_type="application/json")
    response['Access-Control-Allow-Origin'] = '*'
    return response
示例#2
0
def send_monitor_counts(request, course):
    stats = Stats(course)
    encoded = json.dumps(stats.monitor_counts())
    return HttpResponse(encoded, content_type = "application/json")