Oh right, actually add that hook we just documented, "template_context_prerender" :)
This commit sponsored by William Goudie. Thanks Bill! :)
This commit is contained in:
parent
0553976187
commit
1c6d2e87f7
@ -113,6 +113,13 @@ def render_template(request, template_path, context):
|
||||
(request.controller_name, template_path),
|
||||
context)
|
||||
|
||||
# More evil: allow plugins to possibly do something to the context
|
||||
# in every request ever with access to the request and other
|
||||
# variables. Note: this is slower than using
|
||||
# template_global_context
|
||||
context = hook_transform(
|
||||
'template_context_prerender', context)
|
||||
|
||||
rendered = template.render(context)
|
||||
|
||||
if common.TESTS_ENABLED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user