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.
精彩评论