From f6b654de615de61a9ca79e7ccecf7b4a8bf90ec0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=89ric=20Araujo?= Date: Fri, 29 May 2015 16:57:10 -0400 Subject: [PATCH] Fix typo --- docs/api.rst | 2 +- jinja2/loaders.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 3fa80619..088c8673 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -44,7 +44,7 @@ To render it with some variables, just call the :meth:`render` method:: print template.render(the='variables', go='here') -Using a template loader rather then passing strings to :class:`Template` +Using a template loader rather than passing strings to :class:`Template` or :meth:`Environment.from_string` has multiple advantages. Besides being a lot easier to use it also enables template inheritance. diff --git a/jinja2/loaders.py b/jinja2/loaders.py index 376e8585..44aa3925 100644 --- a/jinja2/loaders.py +++ b/jinja2/loaders.py @@ -291,7 +291,7 @@ class DictLoader(BaseLoader): class FunctionLoader(BaseLoader): """A loader that is passed a function which does the loading. The - function becomes the name of the template passed and has to return either + function receives the name of the template and has to return either an unicode string with the template source, a tuple in the form ``(source, filename, uptodatefunc)`` or `None` if the template does not exist. -- 2.47.2