Returns a response. By default, this will contain the rendered PDF, but
        if both ``allow_force_html`` is ``True`` and the querystring
        ``html=true`` was set it will return a plain HTML.

def render(self, request, template, context):
        """
        Returns a response. By default, this will contain the rendered PDF, but
        if both ``allow_force_html`` is ``True`` and the querystring
        ``html=true`` was set it will return a plain HTML.
        """
        if self.allow_force_html and self.request.GET.get('html', False):
            html = get_template(template).render(context)
            return HttpResponse(html)
        else:
            response = HttpResponse(content_type='application/pdf')
            if self.prompt_download:
                response['Content-Disposition'] = 'attachment; filename="{}"' \
                    .format(self.get_download_name())
            helpers.render_pdf(
                template=template,
                file_=response,
                url_fetcher=self.url_fetcher,
                context=context,
            )
            return response