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
- Host: GitHub
- URL: https://github.com/cwaldbieser/jinja2-template-tester
- Owner: cwaldbieser
- License: gpl-3.0
- Created: 2019-03-08T18:00:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-16T18:41:31.000Z (about 7 years ago)
- Last Synced: 2025-10-14T01:13:29.499Z (8 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
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$