Merge pull request #1291 from emanuelschuetze/fix-1235

Fixed #1235 (DeprecationWarning in utils.views.PDFView).
This commit is contained in:
Norman Jäckel 2014-05-19 09:54:45 +02:00
commit 5dc4742f2f

View File

@ -561,7 +561,7 @@ class PDFView(PermissionMixin, View):
story, onFirstPage=firstPage, onLaterPages=laterPages) story, onFirstPage=firstPage, onLaterPages=laterPages)
def render_to_response(self, filename): def render_to_response(self, filename):
response = HttpResponse(mimetype='application/pdf') response = HttpResponse(content_type='application/pdf')
filename = u'filename=%s.pdf;' % self.get_filename() filename = u'filename=%s.pdf;' % self.get_filename()
response['Content-Disposition'] = filename.encode('utf-8') response['Content-Disposition'] = filename.encode('utf-8')