Commit ae9e7b99 authored by Tres Seaver's avatar Tres Seaver

Forward port fix for Collector #1914.

parent 33a390fc
......@@ -62,8 +62,11 @@ class Rtd(RestrictedDTML, TemplateDict):
def call_with_ns(f, ns, arg=1):
td = Rtd()
td.this = ns['here']
td._push(ns['request'])
# prefer 'context' to 'here'; fall back to 'None'
this = ns.get('context', ns.get('here'))
td.this = this
request = ns.get('request', {})
td._push(request)
td._push(InstanceDict(td.this, td))
td._push(ns)
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment