V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
accesine
V2EX  ›  Python

V2ex用到了JinJa 神社 ,求更多介绍

  •  
  •   accesine · Jun 20, 2012 · 6054 views
    This topic created in 5071 days ago, the information mentioned may be changed or developed.
    http://jinja.pocoo.org/

    目前这个模板引擎是Python中比较优秀的吗?

    大家项目中有用到的吗?
    6 replies    1970-01-01 08:00:00 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Jun 22, 2012
    个人最喜欢的。

    而且看来 Google 的人也很喜欢,在最新的 Python 2.7 SDK 中,Jinja2 也是他们为 webapp2 框架选择的模板引擎。
    lyping
        2
    lyping  
       Jun 22, 2012
    @livid 为什么没选择flask呢?
    eerie
        3
    eerie  
       Jun 22, 2012
    @lyping flask也用的jinja2吧?
    vicalloy
        4
    vicalloy  
       Jun 22, 2012
    语法风格和django的模板比较象。
    限制比django的模板少,支持在模板里直接写python代码。
    速度快。

    ps:
    我个人非常希望jinja2能成为django的默认模板。
    SErHo
        5
    SErHo  
       Jun 22, 2012
    @vicalloy jinja2 不支持直接在模板里写 Python 代码吧,这点比较不爽,还是比较喜欢 Tornado 自带的模板引擎。
    Livid
        6
    Livid  
    MOD
    PRO
       Jun 22, 2012
    @lyping 从框架角度来说,Tornado 的继承 Handler 的方式我觉得更适合大型应用的分层设计。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3027 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 07:33 · PVG 15:33 · LAX 00:33 · JFK 03:33
    ♥ Do have faith in what you're doing.