]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
fix Jinja syntax in example 2056/head
authorJamesParrott <80779630+JamesParrott@users.noreply.github.com>
Mon, 9 Dec 2024 15:03:27 +0000 (15:03 +0000)
committerDavid Lord <davidism@gmail.com>
Wed, 18 Dec 2024 17:44:30 +0000 (09:44 -0800)
examples/basic/test.py

index 7a58e1ad4adb6abece5bd52be9039aa6e617f8ba..30f5dd6b3ff6add15386580d54fc73eb96476012 100644 (file)
@@ -6,9 +6,9 @@ env = Environment(
         {
             "child.html": """\
 {% extends default_layout or 'default.html' %}
-{% include helpers = 'helpers.html' %}
+{% import 'helpers.html' as helpers %}
 {% macro get_the_answer() %}42{% endmacro %}
-{% title = 'Hello World' %}
+{% set title = 'Hello World' %}
 {% block body %}
     {{ get_the_answer() }}
     {{ helpers.conspirate() }}