DESCRIPTION.rst 978 B

12345678910111213141516171819202122232425262728293031323334353637
  1. Jinja2
  2. ~~~~~~
  3. Jinja2 is a template engine written in pure Python. It provides a
  4. `Django`_ inspired non-XML syntax but supports inline expressions and
  5. an optional `sandboxed`_ environment.
  6. Nutshell
  7. --------
  8. Here a small example of a Jinja template::
  9. {% extends 'base.html' %}
  10. {% block title %}Memberlist{% endblock %}
  11. {% block content %}
  12. <ul>
  13. {% for user in users %}
  14. <li><a href="{{ user.url }}">{{ user.username }}</a></li>
  15. {% endfor %}
  16. </ul>
  17. {% endblock %}
  18. Philosophy
  19. ----------
  20. Application logic is for the controller but don't try to make the life
  21. for the template designer too hard by giving him too few functionality.
  22. For more informations visit the new `Jinja2 webpage`_ and `documentation`_.
  23. .. _sandboxed: https://en.wikipedia.org/wiki/Sandbox_(computer_security)
  24. .. _Django: https://www.djangoproject.com/
  25. .. _Jinja2 webpage: http://jinja.pocoo.org/
  26. .. _documentation: http://jinja.pocoo.org/2/documentation/