How to make an admin action in django to download user's pdf files
问题 I want to create an admin action to download users pdf files The user file would be uploaded in the media directory What and the admin should be able to download any file I tried using pdfkit to let him download the files but I couldn't > import pdfkit > > def downloadCV(self, request, queryset): > projectUrl = str(queryset[0].cv)+'' > pdf = pdfkit.from_url(projectUrl, False) > response = HttpResponse(pdf,content_type='application/pdf') > response['Content-Disposition'] = 'attachment;