Skip to content

mattcarter/jinja2

This branch is 1103 commits behind pallets/jinja:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7a6704d · Aug 30, 2018
Jan 9, 2017
May 6, 2008
Aug 30, 2018
Mar 22, 2015
Aug 30, 2018
Aug 7, 2018
Aug 30, 2018
Aug 30, 2018
Jul 6, 2017
Mar 19, 2018
Jun 27, 2018
Jun 27, 2018
Jun 27, 2018
Jan 6, 2009
Nov 8, 2017
Dec 28, 2016
Apr 9, 2017
Jul 6, 2017
Aug 30, 2018
Aug 7, 2018

Repository files navigation

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, but don't make the template designer's life difficult by restricting functionality too much.

For more information visit the new Jinja2 webpage and documentation.

The Jinja2 tip is installable via pip with pip install https://github.com/pallets/jinja/zipball/master.

Builds

master https://travis-ci.org/pallets/jinja.svg?branch=master
2.9-maintenance https://travis-ci.org/pallets/jinja.svg?branch=2.9-maintenance

About

The Jinja2 template engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.9%
  • Other 1.1%