Create a global template context in RequestHandler #337

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Move the base template args from RequestHandler.render_string() to RequestHandler.template_context.

RequestHandler.set_template_context for template_context processing.

Useful to set a global context around all requests.

Move template args from RequestHandler.render_string() to
RequestHandler.template_context. Create
RequestHandler.set_template_context() for process
RequestHandler.template_context.
Owner

bdarnell commented Aug 28, 2011

I don't like this api because it encourages mutable non-local state. I'd consider a new get_template_namespace method that is explicitly overridable (since it feels a little fragile to override render_string even though it is the best way currently to add to the template namespace at the handler level).

@allisson allisson closed this Sep 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment