Merging upstream

EmailTemplateFixes
Griffin Caprio 2014-11-02 17:08:35 -06:00
commit 17a03ff44e
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)