The old name was deprecated in django 1.5 and dropped in django 1.7
raise Http404
fc_json = json.dumps(fc_dict)
raise Http404
fc_json = json.dumps(fc_dict)
- return HttpResponse(fc_json, mimetype = 'application/json')
+ return HttpResponse(fc_json, content_type = 'application/json')
def lanes_for(username=None):
"""
def lanes_for(username=None):
"""
#convert query set to python structure
result_json = json.dumps(result)
#convert query set to python structure
result_json = json.dumps(result)
- return HttpResponse(result_json, mimetype='application/json')
+ return HttpResponse(result_json, content_type='application/json')
except ObjectDoesNotExist:
cnfgfile = 'Entry not found for RunFolder = '+runfolder
except ObjectDoesNotExist:
cnfgfile = 'Entry not found for RunFolder = '+runfolder
- return HttpResponse(cnfgfile, mimetype='text/plain')
+ return HttpResponse(cnfgfile, content_type='text/plain')
def getLaneLibs(req):
granted = False
def getLaneLibs(req):
granted = False
outputfile = 'Flowcell entry not found for: '+fcid
else: outputfile = 'Missing input: flowcell id'
outputfile = 'Flowcell entry not found for: '+fcid
else: outputfile = 'Missing input: flowcell id'
- return HttpResponse(outputfile, mimetype='text/plain')
+ return HttpResponse(outputfile, content_type='text/plain')
def estimateFlowcellDuration(flowcell):
"""
def estimateFlowcellDuration(flowcell):
"""
"""
data_file = get_object_or_404(DataFile, random_key = key)
"""
data_file = get_object_or_404(DataFile, random_key = key)
- mimetype = 'application/octet-stream'
+ content_type = 'application/octet-stream'
if data_file.file_type.mimetype is not None:
if data_file.file_type.mimetype is not None:
- mimetype = data_file.file_type.mimetype
+ content_type = data_file.file_type.mimetype
if os.path.exists(data_file.pathname):
return HttpResponse(open(data_file.pathname,'r'),
if os.path.exists(data_file.pathname):
return HttpResponse(open(data_file.pathname,'r'),
+ content_type=content_type)
filepath = erd[lane]
#f = opener.autoopen(filepath, 'r')
filepath = erd[lane]
#f = opener.autoopen(filepath, 'r')
- # return HttpResponse(f, mimetype="application/x-elandresult")
+ # return HttpResponse(f, content_type="application/x-elandresult")
- return HttpResponse(f, mimetype='application/x-bzip2')
+ return HttpResponse(f, content_type='application/x-bzip2')
if ucsc_compatible:
return HttpResponse(bedgen)
else:
if ucsc_compatible:
return HttpResponse(bedgen)
else:
- return HttpResponse(bedgen, mimetype="application/x-bedfile")
+ return HttpResponse(bedgen, content_type="application/x-bedfile")
def _summary_stats(flowcell_id, lane_id, library_id):
def _summary_stats(flowcell_id, lane_id, library_id):
raise Http404
lib_json = json.dumps(lib)
raise Http404
lib_json = json.dumps(lib)
- return HttpResponse(lib_json, mimetype='application/json')
+ return HttpResponse(lib_json, content_type='application/json')
@csrf_exempt
def species_json(request, species_id):
@csrf_exempt
def species_json(request, species_id):