1

在没有模板系统的情况下安装 Pyramid是否有“好方法” ?我所说的模板系统是 Mako 和 Chameleon。在单页应用程序 (SPA) 中,几乎不需要服务器端模板,因为所有模板都使用 javascript 在客户端呈现。我喜欢 Pyramid 的强大功能,但模板系统在某些情况下是不必要的包袱。

我有一种感觉,完成这项任务的唯一方法是 fork Pyramid 并修改 setup.py 以删除这些依赖项。这可能会破坏事情,但话又说回来,Pyramid 的构建方式可能不关心,只要没有尝试为这些模板之一调用渲染器。谁知道?

4

1 回答 1

2

There is a project to eventually remove those templating dependancies and make them available as separate packages. The work started at last year pycon sprints and can be continued this year, who knows. OTOH having those packages installed in your venv doesn't really affect your app so just avoid using them and only use the JSON renderer or any other renderers. Instead of forking Pyramid and removing those dependancies in setup.py I propose you to join us and work on the removal project so we can all benefit the same features.

于 2013-02-19T05:56:04.943 回答