vtpp2014 / jinja

The Jinja2 template engine

Home Page:http://jinja.pocoo.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
ezoic increase your site revenue

About

The Jinja2 template engine

http://jinja.pocoo.org/

License:Other


Languages

Language:Python 99.0%Language:Vim script 0.5%Language:Emacs Lisp 0.4%Language:HTML 0.1%Language:Makefile 0.0%