Django_tex documentation

Core

django_tex.core.compile_template_to_pdf(template_name, context)

Compile the source with render_template_with_context() and run_tex().

django_tex.core.render_template_with_context(template_name, context)

Render the template

django_tex.core.run_tex(source)

Copy the source to temp dict and run latex.

Engine

class django_tex.engine.TeXEngine(params)
app_dirname = 'templates'

Environment

django_tex.environment.environment(**options)

Exceptions

exception django_tex.exceptions.TexError(log, source)
get_message()
django_tex.exceptions.prettify_message(message)

Helper methods that removes consecutive whitespaces and newline characters

django_tex.exceptions.tokenizer(code)

Filters

django_tex.filters.do_linebreaks(value)

Models

class django_tex.models.TeXTemplateFile(*args, **kwargs)
class Meta
abstract = False
name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

django_tex.models.validate_template_path(name)

Views

class django_tex.views.PDFResponse(content, filename=None)
django_tex.views.render_to_pdf(request, template_name, context=None, filename=None)