def send_daily_metrics(request, course): stats = Stats(course) encoded = json.dumps(stats.daily_metrics()) response = HttpResponse(encoded, content_type="application/json") response['Access-Control-Allow-Origin'] = '*' return response
def send_daily_metrics(request, course): stats = Stats(course) encoded = json.dumps(stats.daily_metrics()) return HttpResponse(encoded, content_type = "application/json")