Skip to main content

Integrate Jinja2 into Tornado Framework

This package makes you have the ability that using Jiaja2 Template Engine with Tornado Web Framework. It will replace the default Tornado Templates.

How to use:

Import Jinja2Loader to your project

from tornado_jinja2 import Jinja2Loader

Pass the instance of Jinja2Loader to tornado.web.Application as the value of “template_loader” parameter. You can use the particular Loader from jinja2 and configuring jinaja2 environment by your self.

import tornado.web
import jinja2

# Create a instance of Jinja2Loader
jinja2_env = jinja2.Environment(loader=jinja2.FileSystemLoader('template/path/'), autoescape=False)
jinja2_loader = Jinja2Loader(jinja2_env)

# Give it to Tornado to replace the default Loader.
settings = dict(template_loader=jinja2_loader)
application = tornado.web.Application(handler=[],
                                      **settings)

Release files for tornado-jinja2 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tornado-jinja2 0.2.4
File Size Uploaded
tornado_jinja2-0.2.4.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tornado-jinja2 0.2.4
File Interpreter ABI Platform
tornado_jinja2-0.2.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size:9.1 kB

Release files / tornado_jinja2-0.2.4.tar.gz

Download URL tornado_jinja2-0.2.4.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eb0ac749f4353b3ea99af36c7cc7629de05ab5fa3d6fdd9ab4e10d8c433bf4f0
BLAKE2b-256 checksum
How to use checksums
36bef93459eb02120239446bbceecf92d1c39bed2c43e6b0df00736fffa6d767
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tornado_jinja2-0.2.4-py2.py3-none-any.whl

Download URL tornado_jinja2-0.2.4-py2.py3-none-any.whl
Size 4.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a36d3ea8185e7e3f284501f5b2d531fc342b4f480ac8170ee32668934a3f7821
BLAKE2b-256 checksum
How to use checksums
e30b3758c01bdae3ae1e97c1f6302a725e4c72c9b6277ef84ba8ded9a5e70be3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page