Commit df3a4a38 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

Set content-disposition header for pwclientrc



So that browsers will save, rather than view.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent 8f69dd50
......@@ -29,6 +29,7 @@ from django.contrib.auth.decorators import login_required
import django.core.urlresolvers
from patchwork.requestcontext import PatchworkRequestContext
from django.core import serializers
from django.template.loader import render_to_string
def projects(request):
context = PatchworkRequestContext(request)
......@@ -60,9 +61,10 @@ def pwclientrc(request, project_id):
project = get_object_or_404(Project, linkname = project_id)
context = PatchworkRequestContext(request)
context.project = project
return render_to_response('patchwork/pwclientrc', context,
mimetype = 'text/plain')
response = HttpResponse(mimetype = "text/plain")
response['Content-Disposition'] = 'attachment; filename=.pwclientrc'
response.write(render_to_string('patchwork/pwclientrc', context))
return response
def submitter_complete(request):
search = request.GET.get('q', '')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment