Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions docs/more/development/document-templates/document-context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ It is possible to easily turn the JSON-like / tree-structured document context i

- All data types are using Python, e.g., ``str`` is textual string, ``Optional[str]`` is a string or ``None``, ``list[str]`` is a list of strings.
- We use ``snake_case`` for naming of attributes and variables, ``PascalCase`` is used for class names.
- ``datetime`` is the standard `datetime <https://docs.python.org/3/library/datetime.html#datetime-objects>`__ module.
- ``datetime`` is the standard `datetime <https://docs.python.org/3/library/datetime.html#datetime-objects>`__ module, supports timezone information.

Diagram
-------
Expand Down Expand Up @@ -760,10 +760,8 @@ StringReply

Aliases:

- ``as_number`` (``Optional[float]``) - tries to cast the value to a
number
- ``as_datetime`` (``Optional[datetime]``) - tries to cast the value to
a timestamp
- ``as_number`` (``Optional[float]``) - tries to cast the value to a number
- ``as_datetime`` (``Optional[datetime]``) - tries to cast the value to a timestamp
- ``markdown_html`` (``str``) - renders the value as Markdown and returns HTML
- ``markdown_plain`` (``str``) - renders the value as Markdown and returns plain text (without formatting)

Expand Down
8 changes: 8 additions & 0 deletions docs/more/development/document-templates/specification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ Document Template Metamodel Versions

Here are described the changes in metamodel for template specification as well as :doc:`document context<document-context>` so developers can easily update their templates to a newer metamodel version when needed. It is also possible to check JSON schemas in higher detail, see :doc:`../metamodel-schemas`.

Version 18.1 (since 4.31.0)
---------------------------

* Added:

* ``datetime`` = exposes datetime (https://docs.python.org/3/library/datetime.html) module from Python
* ``zoneinfo`` = exposes zoneinfo (zoneinfo — IANA time zone support — Python 3.14.5 documentation) module from Python

Version 18.0 (since 4.29.0)
---------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/more/development/document-templates/steps/jinja.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ We provide several filters that can be used for conversion of values:

- ``iso_timestamp`` - ``datetime`` or ISO 8601 ``str``
- ``fmt`` - datetime format passed to `strftime <https://docs.python.org/3/library/datetime.html#datetime.date.strftime>`__
- ``tz`` (optional) - timezone name (e.g. ``"UTC"``, ``"Europe/Prague"``) for formatting the timestamp; if not provided, UTC is used

- ``of_alphabet`` = *Converts integer to characters*

Expand Down
4 changes: 4 additions & 0 deletions docs/more/development/metamodel-schemas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Document Context is provided to the document templates by document worker. It co
+-------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------+--------+
| Metamodel Version | Schema file | Changes (brief) | Since |
+===================+==========================================================================================================================+=========================================================+========+
| 18.1 | `JSON Schema <https://github.com/ds-wizard/dsw-schemas/blob/master/schemas/doc-context/doc_context_schema_v18-1.json>`__ | Python datetime and zoneinfo support | 4.31.0 |
+-------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------+--------+
| 18.0 | `JSON Schema <https://github.com/ds-wizard/dsw-schemas/blob/master/schemas/doc-context/doc_context_schema_v18-0.json>`__ | Renaming project and KM package, PluginIntegration | 4.29.0 |
+-------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------+--------+
| 17.1 | `JSON Schema <https://github.com/ds-wizard/dsw-schemas/blob/master/schemas/doc-context/doc_context_schema_v17-1.json>`__ | Configurable instance properties for Document Templates | 4.26.0 |
Expand Down Expand Up @@ -110,6 +112,8 @@ Each template has its descriptor file ``template.json`` which contains all the i
+-------------------+------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+--------+
| Metamodel Version | Schema file | Changes (brief) | Since |
+===================+==============================================================================================================================+=============================================================+========+
| 18.1 | `JSON Schema <https://github.com/ds-wizard/dsw-schemas/blob/master/schemas/template-json/template_json_schema_v18-1.json>`__ | Python datetime and zoneinfo support | 4.31.0 |
+-------------------+------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+--------+
| 18.0 | `JSON Schema <https://github.com/ds-wizard/dsw-schemas/blob/master/schemas/template-json/template_json_schema_v18-0.json>`__ | Renaming project and KM package, PluginIntegration | 4.29.0 |
+-------------------+------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+--------+
| 17.1 | `JSON Schema <https://github.com/ds-wizard/dsw-schemas/blob/master/schemas/template-json/template_json_schema_v17-1.json>`__ | Configurable instance properties for Document Templates | 4.26.0 |
Expand Down