书栈网 · BookStack 本次搜索耗时 0.014 秒,为您找到 490 个相关结果.
  • 常见问题

    常见问题 为什么叫做 Jinja ? 它有多快? Jinja2 与 Django 兼容性如何? 把逻辑放在模板里是不是个可怕的主意? 为什么自动转义不默认开启? 为什么上下文是不可修改的? 加速模块是什么和为什么缺失它? 我的回溯看起来很怪异。发生了什么? 为什么没有 Python 2.3 支持? 我的宏被什么东西给覆盖了 常见问...
  • 安装

    安装 安装 下面命令可以安装扩展: $ easy_install Flask - Babel 或者如果你安装了 pip: $ pip install Flask - Babel 请注意 Flask-Babel 需要 Jinja 2.5。如果你安装一个老的版本你将会需要升级或者禁止 Jinja 支持。
  • Pub/Sub Messages

    Triggering on Pub/Sub Messages Prerequisites Adding a Pub/Sub trigger to a pipeline Payload constraints Passing parameters Passing artifacts Example Triggering on Pub/Sub ...
  • Pylons

    Pylons Pylons 从 Pylons 0.9.7 开始,集成 Jinja 到 Pylons 驱动的应用令人难以置信的简单。 模板引擎在 config/environment.py 中配置。为 Jinja2 的配置看起来是这样: from jinja2 import Environment , PackageLoader ...
  • 转义

    转义 转义 有时想要或甚至必要让 Jinja 忽略部分,不会把它作为变量或块来处理。例如,如果使用默认语法,你想在在使用把 {{ 作为原始字符串使用,并且不会开始一个变量的语法结构,你需要使用一个技巧。 最简单的方法是在变量分隔符中( {{ )使用变量表达式输出: {{ '{{' }} 对于较大的段落,标记一个块为 raw ...
  • 实验性的 Python 3 支持

    实验性的 Python 3 支持 实验性的 Python 3 支持 Jinja 2.3 带来 Python 3 的实验性支持。这意味着在新版本上,所有的单元测试都会通过,但是仍有一些小 bug 和不一致的行为。如果你发现任何 bug ,请向Jinja bug tracker 提供反馈。 也请记住本文档是为 Python 2 编撰的,你会需要手动把...
  • Escaping

    Escaping Escaping It is sometimes desirable – even necessary – to have Jinja ignore partsit would otherwise handle as variables or blocks. For example, if, withthe default synt...
  • Templates

    Templates The Base Layout Register Log In Register A User Templates You’ve written the authentication views for your application, but if you’re running the server and try to...
  • Whitespace Control

    Whitespace Control Whitespace Control In the default configuration: a single trailing newline is stripped if present other whitespace (spaces, tabs, newlines etc.) is retur...
  • Templates

    Templates The Base Layout Register Log In Register A User Templates You’ve written the authentication views for your application, but if you’re running the server and try t...