Controlling whitespace in Jinja2 templates: Difference between revisions

update details of using Jinja
use spaces
Line 2: Line 2:


For background perspective, '''[https://jinja.palletsprojects.com Jinja]''' is used as a templating system by various Python projects like Django, Flask, or Ansible.  
For background perspective, '''[https://jinja.palletsprojects.com Jinja]''' is used as a templating system by various Python projects like Django, Flask, or Ansible.  
=== '''Use spaces''' ===
Since Jinja is based on Python where spaces are relevant, it is preferred to use spaces in your templates rather than tabs.


From the Jinja2 documentation, there are two options to control whitespace in Jinja templates:
From the Jinja2 documentation, there are two options to control whitespace in Jinja templates: