2017-03-05 77 views

回答

0

下面是一些語法錯誤。例如:功能下的類。 你可以試試這個

def download(request): 
    pdf = render_to_pdf('pdf/invoice.html', data) 

    response = HttpResponse(pdf, content_type='application/pdf') 
    response['Content-Disposition'] = 'attachment; filename="mypdf.pdf"' 
     return response 
相關問題