ACIL FM
Dark
Refresh
Current DIR:
/usr/share/doc/python3-jinja2/examples/basic
/
usr
share
doc
python3-jinja2
examples
basic
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
templates
-
chmod
Open
Rename
Delete
cycle.py
340 B
chmod
View
DL
Edit
Rename
Delete
debugger.py
262 B
chmod
View
DL
Edit
Rename
Delete
inheritance.py
431 B
chmod
View
DL
Edit
Rename
Delete
test.py
714 B
chmod
View
DL
Edit
Rename
Delete
test_filter_and_linestatements.py
495 B
chmod
View
DL
Edit
Rename
Delete
test_loop_filter.py
340 B
chmod
View
DL
Edit
Rename
Delete
translate.py
582 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/share/doc/python3-jinja2/examples/basic/test.py
from __future__ import print_function 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())
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply