Linux server1.hosting4iran.com 4.18.0-553.123.2.el8_10.x86_64 #1 SMP Thu May 7 15:28:41 EDT 2026 x86_64
LiteSpeed
Server IP : 185.208.174.156 & Your IP : 216.73.216.84
Domains : 326 Domain
User : satitravel
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
python3-jinja2 /
examples /
basic /
Delete
Unzip
Name
Size
Permission
Date
Action
templates
[ DIR ]
drwxr-xr-x
2025-12-21 17:04
cycle.py
277
B
-rw-r--r--
2018-10-04 14:01
debugger.py
223
B
-rw-r--r--
2018-10-04 14:01
inheritance.py
341
B
-rw-r--r--
2018-10-04 14:01
test.py
612
B
-rw-r--r--
2018-10-04 14:01
test_filter_and_linestatements.py
446
B
-rw-r--r--
2018-10-04 14:01
test_loop_filter.py
296
B
-rw-r--r--
2018-10-04 14:01
translate.py
524
B
-rw-r--r--
2018-10-04 14:01
Save
Rename
from jinja2 import Environment from jinja2.loaders import DictLoader env = Environment(loader=DictLoader({ 'child.html': u'''\ {% extends master_layout or 'master.html' %} {% include helpers = 'helpers.html' %} {% macro get_the_answer() %}42{% endmacro %} {% title = 'Hello World' %} {% block body %} {{ get_the_answer() }} {{ helpers.conspirate() }} {% endblock %} ''', 'master.html': u'''\ <!doctype html> <title>{{ title }}</title> {% block body %}{% endblock %} ''', 'helpers.html': u'''\ {% macro conspirate() %}23{% endmacro %} ''' })) tmpl = env.get_template("child.html") print(tmpl.render())