Skip to content

Draft: jinja2: Extend once semantics

Until now, and by default, once has two behaviors:

  1. Render only if the file pointed by once does not exist
  2. If the file pointed by once does not exist, create it

Introduce once-done option to allow selecting independently one behavior, or both with different files. Option once-done points to the file that will be create: if once-done is unset, it will be the same file as once; if once-done is set to empty, it will not create any file.

Merge request reports