I am making the view to list the data in my view like this
class DownloadView(ListView):
template_name = 'mytemplate.html'
Now in my that view , i want that when the page loads then i generate a pdf file in that view (which i can do) and then it should prompt the user with save file option. how can i do that
Check out the django docs, it shows populating the
response['Content-Disposition']with'attachment; filename="somefilename.pdf"', but I think the following may work, if you’ve read the pdf file data intopdf_data.