Created
April 7, 2015 21:03
-
-
Save erickgnavar/a61f523414ba8b778769 to your computer and use it in GitHub Desktop.
PDF response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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