context['scheme'] = 'https'
else:
context['scheme'] = 'http'
- response = HttpResponse(mimetype = "text/plain")
+ response = HttpResponse(content_type = "text/plain")
response['Content-Disposition'] = 'attachment; filename=.pwclientrc'
response.write(render_to_string('patchwork/pwclientrc', context))
return response
def pwclient(request):
context = PatchworkRequestContext(request)
- response = HttpResponse(mimetype = "text/x-python")
+ response = HttpResponse(content_type = "text/x-python")
response['Content-Disposition'] = 'attachment; filename=pwclient'
response.write(render_to_string('patchwork/pwclient', context))
return response
def submitter_complete(request):
search = request.GET.get('q', '')
limit = request.GET.get('l', None)
- response = HttpResponse(mimetype = "text/plain")
+ response = HttpResponse(content_type = "text/plain")
if len(search) <= 3:
return response
mbox = '\n'.join([patch_to_mbox(p).as_string(True)
for p in bundle.ordered_patches()])
- response = HttpResponse(mimetype='text/plain')
+ response = HttpResponse(content_type='text/plain')
response['Content-Disposition'] = \
'attachment; filename=bundle-%d-%s.mbox' % (bundle.id, bundle.name)
def content(request, patch_id):
patch = get_object_or_404(Patch, id=patch_id)
- response = HttpResponse(mimetype="text/x-patch")
+ response = HttpResponse(content_type="text/x-patch")
response.write(patch.content)
response['Content-Disposition'] = 'attachment; filename=' + \
patch.filename().replace(';', '').replace('\n', '')
def mbox(request, patch_id):
patch = get_object_or_404(Patch, id=patch_id)
- response = HttpResponse(mimetype="text/plain")
+ response = HttpResponse(content_type="text/plain")
response.write(patch_to_mbox(patch).as_string(True))
response['Content-Disposition'] = 'attachment; filename=' + \
patch.filename().replace(';', '').replace('\n', '')