这是我的网址
url(r'download/$', views.DownloadView.serve_pdf, name="pdfdata-ddl" )
这是我的看法
class DownloadView():
def serve_pdf(request):
#pdf_data = magically_create_pdf()
response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'attachment; filename="/test/angular.pdf"'
return response
错误是这个
unbound method serve_pdf() must be called with DownloadView instance as first argument (got WSGIRequest instance instead)