$73 GRAYBYTE WORDPRESS FILE MANAGER $33

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python37/share/doc/alt-python37-jinja2/examples/basic/

HOME
Current File : /opt/alt/python37/share/doc/alt-python37-jinja2/examples/basic//test.py
from jinja2 import Environment
from jinja2.loaders import DictLoader

env = Environment(
    loader=DictLoader(
        {
            "child.html": """\
{% extends default_layout or 'default.html' %}
{% include helpers = 'helpers.html' %}
{% macro get_the_answer() %}42{% endmacro %}
{% title = 'Hello World' %}
{% block body %}
    {{ get_the_answer() }}
    {{ helpers.conspirate() }}
{% endblock %}
""",
            "default.html": """\
<!doctype html>
<title>{{ title }}</title>
{% block body %}{% endblock %}
""",
            "helpers.html": """\
{% macro conspirate() %}23{% endmacro %}
""",
        }
    )
)
tmpl = env.get_template("child.html")
print(tmpl.render())


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
9 Nov 2021 8.26 PM
root / linksafe
0755
templates
--
3 Mar 2024 11.11 PM
root / linksafe
0755
cycle.py
0.294 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
debugger.py
0.218 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
inheritance.py
0.383 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
test.py
0.659 KB
11 May 2021 11.25 PM
root / linksafe
0644
test_filter_and_linestatements.py
0.445 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
test_loop_filter.py
0.294 KB
5 Apr 2021 5.47 PM
root / linksafe
0644
translate.py
0.531 KB
5 Apr 2021 5.47 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF