以下是一些Cheetah代码,这些代码解释了模板定义的“简单”部分——没有流控制的那一部分,Python的内置模板系统可以处理它。
Here's some Cheetah code that interprets the "easy" portion of the template definition — the part with no flow control, which Python's built-in templating systems can handle.
上面这段模板的变化本身会失败,因为在从控制器方法返回的字典中没有 cart 值。
The above template change, by itself, will fail, since there isn't a cart value in the return dictionaries from the controller methods.
master页面还只是控制着七个页面的布局样式,测试你是否删除了一个必须的控件可能不会花费很多的时间,但是在其他的模板页就没有怎么幸运了。
Since the simple.master only controls the look and feel of seven pages, it doesn't take too much time to check each page to see if you removed a required control.
应用推荐