Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

translated into Chinese

  • Loading branch information...
commit afeb3924ba2d90d457f46594f43d107ee4249c34 1 parent a16cad6
Borta authored anandology committed
Showing with 8 additions and 8 deletions.
  1. +8 −8 cookbook/
16 cookbook/
@@ -5,18 +5,18 @@ title: How to use templates on Google App Engine
# How to use templates on Google App Engine
-## Problem
+## 问题
-How to use templates on Google App Engine
+如何在 Google App Engine 上使用模板
-## Solution
+## 解答 templetor compiles the templates to python source, which requires accessing parser module of python standard library. Unfortunately that module is blocked in GAE for security reasons. templetor 把模板编译成 python 字节码,这需要访问标准库中的 parser 模块。不幸的是,由于安全原因 GAE 禁用了这个模块。
+为了克服这个状况, 支持把模板编译成 python 代码,从而避免在 GAE 上使用原来的模板。 确保在应用这种方法的时候模板中的代码不需要任何改变。
-To overcome that situation, supports compiling the templates to python code so that the compiled sources can be used on GAE instead of the original templates. makes sure that no code changes are required to use templates in this way.
-To compile all templates in a template dir (has to be redone each time a template has changed):
$ python web/ --compile templates
-This compiles all templates in templates/ dir recursively and creates `` with all the templates in that dir. On GAE, `web.template.render` is re-written to treat `templates/` as python module.
+以上命令把 templates/ 目录下的模板文件递归地全部编译,并且生产 ``, 'web.template.render` 重新编写过,它将视 templates 为一个 python 模块。

0 comments on commit afeb392

Please sign in to comment.
Something went wrong with that request. Please try again.