django-wkhtmltopdf: Error 'NoneType' object has no attribute 'endswith'

I’m trying to implement the basic example of this wrapper in my project using the url

url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html',
                                       filename='my_pdf.pdf'), name='pdf'),

my settings.py

WKHTMLTOPDF_CMD_OPTIONS = { ‘quiet’:True, } WKHTMLTOPDF_CMD = “/usr/local/bin/wkhtmltopdf/”

this is the error in the library

wkhtmltopdf

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@mach505 you need to have:

  1. MEDIA_ROOT
  2. MEDIA_URL
  3. STATIC_ROOT
  4. STATIC_URL

See docs.