python jinja2
Templating is an extremely useful technique when it comes to code reuse. Templates allow you to update only areas that change, preventing duplication of static areas. For example, navigations and footers rarely change. These two areas might be contained in a parent template while the middle of the page, where content changes often, switches out child templates.
当涉及到代码重用时,模板是一种非常有用的技术。 模板允许您仅更新更改的区域,从而防止静态区域重复。 例如,导航和页脚很少更改。 这两个区域可能包含在父模板中,而内容经常更改的页面中间会切换出子模板。
Most Python developers like myself are familiar with Django and its ability to use templating. But when all you want is templating functionality, there’s no reason to install a full-blown framework. This is where Jinja comes in. Being very small, it’s simple to install and configure. Best of all, if you know how to use templating in Django, you’ll understand templating in Jinja.
像我这样的大多数Python开发人员都熟悉Django及其使用模板的能力。 但是,当您只需要模板功能时,就没有理由安装功能完善的框架。 这就是Jinja的用处。它很小,安装和配置都很简单。 最重要的是,如果您知道如何在Django中使用模板,那么您将了解Jinja中的模板。
In this screencast, I’ll demonstrate how to use Jinja templating along with the Google App Engine.
在此截屏视频中,我将演示如何将Jinja模板与Google App Engine一起使用。
For more great content like this, visit the Hub, run by our friends at Learnable!
有关此类更丰富的内容,请访问由Learnable的朋友运营的中心 。
翻译自: https://www.sitepoint.com/using-python-templates-jinja-google-app-engine/
python jinja2
相关资源:jdk-8u281-windows-x64.exe