1 Star 0 Fork 0

douglarek/jinja2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
README.rst 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
Armin Ronacher 提交于 2010-10-17 15:58 . Added README

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 try to make the life for the template designer too hard by giving him too few functionality.

For more informations visit the new Jinja2 webpage and documentation.

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

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/douglarek/jinja2.git
git@gitee.com:douglarek/jinja2.git
douglarek
jinja2
jinja2
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385