Add Jinja include relative paths to Fluorine release notes

This commit is contained in:
plastikos 2018-06-08 02:02:07 -06:00 committed by GitHub
parent 540bcde985
commit 1be25616a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -594,3 +594,29 @@ This release add an additional search using the ``groupattribute`` field as
well. The original ``accountattributename`` search is done first then the
``groupattribute`` allowing for backward compatibility with previous Salt
releases.
Jinja Include Relative Paths
============================
When a jinja include template name begins with './' or
'../' then the import will be relative to the importing file.
Prior practices required the following construct:
.. code-block:: jinja
{% from tpldir ~ '/foo' import bar %}
A more "natural" construct is now supported:
.. code-block:: jinja
{% from './foo' import bar %}
Comparatively when importing from a parent directory - prior practice:
.. code-block:: jinja
{% from tpldir ~ '/../foo' import bar %}
New style for including from a parent directory:
.. code-block:: jinja
{% from '../foo' import bar %}