From 81825095d24f4dbccb40f787fff70db54989b91c Mon Sep 17 00:00:00 2001 From: David Lord Date: Wed, 23 Oct 2019 13:35:49 -0700 Subject: [PATCH] use "Jinja" instead of "Jinja2" --- docs/sandbox.rst | 2 +- docs/switching.rst | 8 ++++---- jinja2/compiler.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/sandbox.rst b/docs/sandbox.rst index 0dac5a09..1222d025 100644 --- a/docs/sandbox.rst +++ b/docs/sandbox.rst @@ -75,7 +75,7 @@ will use the :attr:`SandboxedEnvironment.binop_table` to translate operator symbols into callbacks performing the default operator behavior. This example shows how the power (``**``) operator can be disabled in -Jinja2:: +Jinja:: from jinja2.sandbox import SandboxedEnvironment diff --git a/docs/switching.rst b/docs/switching.rst index 1e2701df..8225b2ee 100644 --- a/docs/switching.rst +++ b/docs/switching.rst @@ -124,7 +124,7 @@ argument passing is different. A template that looks like this in Django:: {{ items|join:", " }} -looks like this in Jinja2:: +looks like this in Jinja:: {{ items|join(', ') }} @@ -158,7 +158,7 @@ example, the Django template:: No items! {% endfor %} -...looks like this in Jinja2:: +...looks like this in Jinja:: {% for item in items %} {{ item }} @@ -169,7 +169,7 @@ example, the Django template:: Cycle ~~~~~ -The ``{% cycle %}`` tag does not exist in Jinja2; however, you can achieve the +The ``{% cycle %}`` tag does not exist in Jinja; however, you can achieve the same output by using the `cycle` method on the loop context special variable. The following Django template:: @@ -178,7 +178,7 @@ The following Django template::
  • {{ user }}
  • {% endfor %} -...looks like this in Jinja2:: +...looks like this in Jinja:: {% for user in users %}
  • {{ user }}
  • diff --git a/jinja2/compiler.py b/jinja2/compiler.py index b734611b..488ef0a3 100644 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@ -521,7 +521,7 @@ class CodeGenerator(NodeVisitor): undeclared = find_undeclared(node.body, ('caller', 'kwargs', 'varargs')) if 'caller' in undeclared: - # In older Jinja2 versions there was a bug that allowed caller + # In older Jinja versions there was a bug that allowed caller # to retain the special behavior even if it was mentioned in # the argument list. However thankfully this was only really # working if it was the last argument. So we are explicitly -- 2.47.2