An open API service indexing awesome lists of open source software.

https://github.com/cwaldbieser/jinja2-template-tester

jinja2 template tester
https://github.com/cwaldbieser/jinja2-template-tester

Last synced: 8 months ago
JSON representation

jinja2 template tester

Awesome Lists containing this project

README

          

Jinja2 Template Tester
======================

Test jinja2 templates.

Example:

.. code:: shell

$ cat test.json

{
"givenName": ["Carl"],
//"displayName": ["Carl"],
"sn": ["Waldbieser"],
"netid": ["waldbiec"]
}
$ cat test.jinja2

GN : {{data.givenName | first}}
PFN: {{data.displayName | first}}
SN : {{data.sn | first}}
UID: {{data.netid | first}}
$ pipenv run ./jinja2test.py ./test.jinja2 ./test.json

GN : Carl
PFN:
SN : Waldbieser
UID: waldbiec
waldbiec@waldbiec-Latitude-7490:~/git-repos/jinja2-test$