from django.template.loader import render_to_string
rendered = render_to_string(template, context)
from django.template.loader import render_to_string
rendered = render_to_string(template, context)
tempdir = mkdtemp(prefix="render_to_pdf-")
tex_path = os.path.join(tempdir, "doc.tex")
with open(tex_path, 'w') as tex_file:
tempdir = mkdtemp(prefix="render_to_pdf-")
tex_path = os.path.join(tempdir, "doc.tex")
with open(tex_path, 'w') as tex_file:
- subprocess.check_call(['xelatex', '-interaction=batchmode', tex_path],
+ subprocess.check_call(
+ ['xelatex', '-interaction=batchmode', tex_path],
rendered = render_to_string(template, context)
with open(output_path, 'w') as csv_file:
rendered = render_to_string(template, context)
with open(output_path, 'w') as csv_file: