response['Content-Disposition'] = 'filename="Enquiry_{}.pdf'.format(enquiry
    .reference)
weasyprint.HTML(string=html, base_url=request.build_absolute_uri()).write_pdf(
    response, stylesheets=[weasyprint.CSS(settings.STATICFILES_DIRS[0] +
    '/css/print.css')])
Base URL for Django, Behind Nginx Proxy