我目前正在使用金字塔web框架並使用Mako模板進行配置。我知道我可以在視圖方法(Pyramid - Is it possible to render my mako template as a string within my view callable?)中將模板呈現爲字符串,但是,我想知道是否可以從視圖中獲取實際的模板對象,而不僅僅是用於呈現模板的函數。 翻閱金字塔源代碼,在mako_tem
這是有關這個問題的調試Mako的模板:How do you debug Mako templates? One response提到內置的debugging system in Mako和there's a comment about how it works well in Pyramid。但是,我不知道如何將金字塔中提到的內容合併到一起,因爲您從不直接調用Mako的模板渲染方法。