From: Éric Araujo Date: Fri, 29 May 2015 20:57:10 +0000 (-0400) Subject: Fix typo X-Git-Tag: 2.8~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6b654de615de61a9ca79e7ccecf7b4a8bf90ec0;p=thirdparty%2Fjinja.git Fix typo --- 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.