Allow providing extra context to TemplateHook.
Review Request #5582 — Created March 4, 2014 and submitted — Latest diff uploaded
Previously, if one wanted to provide additional context to TemplateHook,
it would have to subclass and overriderender_to_string()
. Now, extra
context can be provided to the constructor, and subclasses can
dynamically provide additional context by overriding
get_extra_context()
.
Made use of this in an extension, which nicely simplified the extension.