msg.attach_alternative(html_content, 'text/html')
msg.attach('pdf_filename.pdf', response.rendered_content, 'application/pdf')
Any way to create PDF file with wkhtmltopdf without returning HttpResponse or using URL? I just want to attach PDF file to email