I have this code
class DownloadView(TemplateView):
template_name = 'pdfform/create_form2.html'
def serve_pdf(self, request):
#pdf_data = magically_create_pdf()
response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'attachment; filename="http://localhost/static/pdfs/angular.pdf"'
return response
When i go to that page i get the downlaod dialog but i am not able to download the file. it says that
http 403 forbidden
Now i can directly access the file but putting http://localhost/static/pdfs/angular.pdf
that in browser
i treid puting static/pdfs/angular.pdf
but same error