Go to file
2015-05-16 22:51:49 -07:00
artwork documentation style updates, added print css 2008-05-06 12:14:23 +02:00
docs Let the Environment override the Context 2015-04-06 14:19:43 +02:00
examples change py2 print statements to py3 2015-03-22 14:25:15 +01:00
ext Update djangojinja2.py 2014-08-28 13:37:41 -04:00
jinja2 Let the Environment override the Context 2015-04-06 14:19:43 +02:00
scripts Fix doctests 2015-03-22 14:22:52 +01:00
tests Let the Environment override the Context 2015-04-06 14:19:43 +02:00
.gitignore Added .egg to .gitignore 2013-05-20 01:32:44 +01:00
.travis.yml Fix travis 2015-03-22 14:32:16 +01:00
AUTHORS Add myself. 2013-05-18 10:39:12 +01:00
CHANGES Add changelog for #404 2015-04-06 14:27:03 +02:00
LICENSE Fixed inconsistency in LICENSE file. 2009-01-06 13:10:58 +01:00
Makefile Rename testsuite to tests and suggestions 2015-03-22 18:03:14 +05:30
MANIFEST.in Added nicer test finder from Flask 2013-05-20 11:51:37 +01:00
README.rst Fix typos and grammar in Readme 2015-05-16 22:51:49 -07:00
setup.cfg Actually don't run doctests 2015-03-22 14:36:42 +01:00
setup.py Rename testsuite to tests and suggestions 2015-03-22 18:03:14 +05:30
tox.ini Rename testsuite to tests and suggestions 2015-03-22 18:03:14 +05:30

Jinja2
~~~~~~

Jinja2 is a template engine written in pure Python.  It provides a
`Django`_ inspired non-XML syntax but supports inline expressions and
an optional `sandboxed`_ environment.

Nutshell
--------

Here a small example of a Jinja template::

    {% extends 'base.html' %}
    {% block title %}Memberlist{% endblock %}
    {% block content %}
      <ul>
      {% for user in users %}
        <li><a href="{{ user.url }}">{{ user.username }}</a></li>
      {% endfor %}
      </ul>
    {% endblock %}

Philosophy
----------

Application logic is for the controller; however, try not to make life painful
for the template designer due to not enough functionality.

For more information visit the new `Jinja2 webpage`_ and `documentation`_.

The `Jinja2 tip`_ is installable via `easy_install` with ``easy_install
Jinja2==dev``.

.. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
.. _Django: http://www.djangoproject.com/
.. _Jinja2 webpage: http://jinja.pocoo.org/
.. _documentation: http://jinja.pocoo.org/docs/
.. _Jinja2 tip: http://jinja.pocoo.org/docs/intro/#as-a-python-egg-via-easy-install

Builds
------

+---------------------+------------------------------------------------------------------------------+
| ``master``          | .. image:: https://travis-ci.org/mitsuhiko/jinja2.svg?branch=master          |
|                     |     :target: https://travis-ci.org/mitsuhiko/jinja2                          |
+---------------------+------------------------------------------------------------------------------+
| ``2.7-maintenance`` | .. image:: https://travis-ci.org/mitsuhiko/jinja2.svg?branch=2.7-maintenance |
|                     |     :target: https://travis-ci.org/mitsuhiko/jinja2                          |
+---------------------+------------------------------------------------------------------------------+