Use the controller's symbolic/lookup name as part of the key for context hooks
This commit sponsored by David Collins. Thank you!
This commit is contained in:
parent
e39feb041b
commit
98dacfe67e
@ -201,9 +201,9 @@ class MediaGoblinApp(object):
|
||||
exc.get_description(environ))(environ, start_response)
|
||||
|
||||
controller = endpoint_to_controller(found_rule)
|
||||
# Make a reference to the controller on the request...
|
||||
# Make a reference to the controller's symbolic name on the request...
|
||||
# used for lazy context modification
|
||||
request.controller = controller
|
||||
request.controller_name = found_rule.endpoint
|
||||
|
||||
# pass the request through our meddleware classes
|
||||
try:
|
||||
|
@ -107,7 +107,7 @@ def render_template(request, template_path, context):
|
||||
|
||||
# allow plugins to do things to the context
|
||||
context = hook_transform(
|
||||
(request.controller, template_path),
|
||||
(request.controller_name, template_path),
|
||||
context)
|
||||
|
||||
rendered = template.render(context)
|
||||
|
Loading…
x
Reference in New Issue
Block a user