Expand description
The context of a document template: what core sends the document plugin (the html and pdf
formats) in a format write request’s template, and the Jinja environment the plugin
builds from it. Rendering happens in the plugin; core only runs the queries and sends this.
The plugin builds its environment with environment, so var(), run.*, target.name,
the date functions and the number filters behave exactly as in core’s own templates (one
implementation, no copy to drift), and results.<query> is the same value messages read.
Structs§
- Check
- What
validatesends the plugin for an html or pdf output, sodre validatechecks its template: the file, the project root, and the output’s queries (whatresults.<name>may name), in order. - Context
- A format
writerequest’stemplatefor the html and pdf formats. - RunInfo
run.*andtarget.name, as plain values.
Constants§
Functions§
- environment
- A Jinja environment with everything core’s templates read:
var(),run.*,target.name, the date functions and the number filters. Undefined values are errors. The caller adds its loader, escaping and its own filters. - query_
result - One query’s result from its Arrow batches, as
results.<query>holds it (every row). - results_
value results: each query’s result by name, iterating in the order given (the YAML’s).