From a8fc78fcdac90e79e572ce9f3c91e2617e54ee9a Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 18 Oct 2018 04:26:25 -0700 Subject: [PATCH] fixes #76 --- responder/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/responder/api.py b/responder/api.py index 2cd7285..8008738 100644 --- a/responder/api.py +++ b/responder/api.py @@ -390,12 +390,12 @@ class API: """Given a static asset, return its URL path.""" return f"{self.static_route}/{str(asset)}" - def template(self, name, auto_escape=True, **values): + def template(self, name_, auto_escape=True, **values): """Renders the given `jinja2 `_ template, with provided values supplied. Note: The current ``api`` instance is always passed into the view. - :param name: The filename of the jinja2 template, in ``templates_dir``. + :param name_: The filename of the jinja2 template, in ``templates_dir``. :param auto_escape: If ``True``, HTML and XML will automatically be escaped. :param values: Data to pass into the template. """ @@ -410,7 +410,7 @@ class API: autoescape=jinja2.select_autoescape(["html", "xml"] if auto_escape else []), ) - template = env.get_template(name) + template = env.get_template(name_) return template.render(**values) def template_string(self, s, auto_escape=True, **values):