diff --git a/questionnaire/emails.py b/questionnaire/emails.py index 0c68853..d4f5662 100644 --- a/questionnaire/emails.py +++ b/questionnaire/emails.py @@ -156,5 +156,5 @@ def send_emails(request=None, qname=None): outlog.append("Exception: [%s] %s: %s" % (r.runid, r.subject.surname, str(e))) if request: return HttpResponse("Sent Questionnaire Emails:\n " - +"\n ".join(outlog), mimetype="text/plain") + +"\n ".join(outlog), content_type="text/plain") return "\n".join(outlog) diff --git a/questionnaire/views.py b/questionnaire/views.py index dca1dea..10ff391 100644 --- a/questionnaire/views.py +++ b/questionnaire/views.py @@ -218,7 +218,7 @@ def get_async_progress(request, *args, **kwargs): cache.set('progress' + runinfo.random, response['progress']) response = HttpResponse(json.dumps(response), - mimetype='application/javascript'); + content_type='application/javascript'); response["Cache-Control"] = "no-cache" return response @@ -765,7 +765,7 @@ def export_csv(request, qid): # questionnaire_id a if a else '--' for a in answer_row] writer.writerow(row) - response = HttpResponse(FileWrapper(fd), mimetype="text/csv") + response = HttpResponse(FileWrapper(fd), content_type="text/csv") response['Content-Length'] = fd.tell() response['Content-Disposition'] = 'attachment; filename="export-%s.csv"' % qid fd.seek(0)