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
def send_monitor_counts(request, course): stats = Stats(course) encoded = json.dumps(stats.monitor_counts()) return HttpResponse(encoded, content_type = "application/json")