Skip to content

Commit

Permalink
fix for render_to_format title
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed May 15, 2017
1 parent a78812b commit 66f0187
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions apps/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ def get_model_field_meta(model):

def render_to_format(request, format, title, template_src, context):

# for some weird reason we have to cast here explicitly
format = str(format)
title = str(title)

if format in settings.EXPORT_FORMATS:

# render the template to a html string
Expand Down Expand Up @@ -104,7 +100,7 @@ def render_to_format(request, format, title, template_src, context):

# create the response object
response = HttpResponse(file_content, content_type='application/%s' % format)
response['Content-Disposition'] = content_disposition
response['Content-Disposition'] = content_disposition.encode('utf-8')

return response
else:
Expand Down

0 comments on commit 66f0187

Please sign in to comment.