Navigation Menu

Skip to content

Commit

Permalink
Support render_params in kajiki
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Jun 18, 2016
1 parent 0585de7 commit d31d04e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tg/renderers/kajiki.py
Expand Up @@ -72,7 +72,7 @@ def __init__(self, loader):
self.loader = loader

def __call__(self, template_name, template_vars, cache_key=None,
cache_type=None, cache_expire=None):
cache_type=None, cache_expire=None, **render_params):
"""Render a template with Kajiki
Accepts the cache options ``cache_key``, ``cache_type``, and
Expand All @@ -82,7 +82,7 @@ def __call__(self, template_name, template_vars, cache_key=None,
# Create a render callable for the cache function
def render_template():
# Grab a template reference
template = self.loader.load(template_name)
template = self.loader.load(template_name, **render_params)
return Markup(template(template_vars).render())

return cached_template(template_name, render_template,
Expand Down

0 comments on commit d31d04e

Please sign in to comment.