Skip to content

Instantly share code, notes, and snippets.

@erickgnavar
Created April 7, 2015 21:03
Show Gist options
  • Save erickgnavar/a61f523414ba8b778769 to your computer and use it in GitHub Desktop.
Save erickgnavar/a61f523414ba8b778769 to your computer and use it in GitHub Desktop.
PDF response
response = HttpResponse(content_type='application/pdf')
response['Content-Disposition'] = 'attachment; filename="{}.pdf"'.format('file name')
response.write('contenido del pdf') # lo generas con alguna libreria como reportlab
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment