equal
deleted
inserted
replaced
347 except TemplateNotFound: |
347 except TemplateNotFound: |
348 v = default |
348 v = default |
349 if callable(v) and getattr(v, '_requires', None) is None: |
349 if callable(v) and getattr(v, '_requires', None) is None: |
350 # old templatekw: expand all keywords and resources |
350 # old templatekw: expand all keywords and resources |
351 # (TODO: deprecate this after porting web template keywords to new API) |
351 # (TODO: deprecate this after porting web template keywords to new API) |
352 props = {k: f(context, mapping, k) |
352 props = {k: context._resources.lookup(context, mapping, k) |
353 for k, f in context._resources.items()} |
353 for k in context._resources.knownkeys()} |
354 # pass context to _showcompatlist() through templatekw._showlist() |
354 # pass context to _showcompatlist() through templatekw._showlist() |
355 props['templ'] = context |
355 props['templ'] = context |
356 props.update(mapping) |
356 props.update(mapping) |
357 return v(**pycompat.strkwargs(props)) |
357 return v(**pycompat.strkwargs(props)) |
358 if callable(v): |
358 if callable(v): |