Django Book 翻译
菜单>:
TOC
返回
原文:
Weve so far been producing views by hard-coding HTML into the Python code. Unfortunately, this is nearly always a bad idea. Luckily, Django ships with a simple yet powerful template engine that allows you to separate the design of the page from the underlying code. Well dive into Djangos template engine in the next chapter.
翻译:
我们现在已经学会了怎么在Python代码里硬编码HTML代码来处理视图。可惜的是,这种方法通常不是一个好方法。幸运的是,Django内建有一个简单有强大的模板处理引擎来让你分离两种工作:设计HTML页面和编写Python代码。下一章我们将深入到Django的模板引擎里去。
备注:
译者: