Functions¶
Atfinity defines some useful, additional Jinja functions when working with ADX:
| Name | Description |
|---|---|
render_markdown |
Renders a string to markdown. Note that only basic formatting, not tables, is supported. |
json_loads |
Converts a given string representing JSON to a Python dictionary, so you can easily process the result with Jinja. |
json_dumps |
Converts a Python object to a JSON string. |
translate_string |
See Custom Translations. |
format_date(date, date_format=None) |
Formats a date value. Optionally accepts a format string. Uses the document language. Also available as a filter. |
format_date_speaking(date) |
Formats a date in a human-readable format (D. MMMM YYYY). Uses the document language. Also available as a filter. |
format_date_time(datetime, date_format=None, time_format=None) |
Formats a datetime value. Optionally accepts separate date and time format strings. Uses the document language. Also available as a filter. |
format_date_time_speaking(datetime) |
Formats a datetime in a human-readable format. Uses the document language. Also available as a filter. |
is_known(value) |
Returns True if the value is not None. Also available as a filter. |
is_unknown(value) |
Returns True if the value is None. Also available as a filter. |