Rename s to s_ in api.template_string()

Issue described in #76 applied here as well, however less propable.
Same fix as in a8fc78fcda
This commit is contained in:
Peder Bergebakken Sundt
2018-10-18 20:10:52 +02:00
parent fdd3d4d85a
commit e46b3a5e19
+3 -3
View File
@@ -429,12 +429,12 @@ class API:
template = env.get_template(name_)
return template.render(**values)
def template_string(self, s, auto_escape=True, **values):
def template_string(self, s_, auto_escape=True, **values):
"""Renders the given `jinja2 <http://jinja.pocoo.org/docs/>`_ template string, with provided values supplied.
Note: The current ``api`` instance is always passed into the view.
:param s: The template to use.
:param s_: The template to use.
:param auto_escape: If ``True``, HTML and XML will automatically be escaped.
:param values: Data to pass into the template.
"""
@@ -451,7 +451,7 @@ class API:
loader=jinja2.BaseLoader, autoescape=jinja2.select_autoescape([])
)
template = env.from_string(s)
template = env.from_string(s_)
return template.render(**values)
def run(self, address=None, port=None, **options):