开发者

Best practice for pylons app global tmpl_context settings?

I'm writing a pylons application, and I'm w开发者_开发技巧ondering if there is a best practice for where to set some application specific values of the template context object (tmpl_context)?

Currently, I've added a __before__() method to the BaseController and am setting up the tmpl_context object with values there but am wondering if there is another place.


I think the BaseController is a good place to put that, either in __call__() or in __before__().


a __before__ method is a right place to do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜