jinja2 Engine for tornado web framework
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tornado_jinja2-0.2.4.tar.gz.
File metadata
- Download URL: tornado_jinja2-0.2.4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb0ac749f4353b3ea99af36c7cc7629de05ab5fa3d6fdd9ab4e10d8c433bf4f0
|
|
| MD5 |
b29ba402ed361a9425d1a6a014ecff45
|
|
| BLAKE2b-256 |
36bef93459eb02120239446bbceecf92d1c39bed2c43e6b0df00736fffa6d767
|
File details
Details for the file tornado_jinja2-0.2.4-py2.py3-none-any.whl.
File metadata
- Download URL: tornado_jinja2-0.2.4-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a36d3ea8185e7e3f284501f5b2d531fc342b4f480ac8170ee32668934a3f7821
|
|
| MD5 |
f9cab082cb334c8db35631beecc6e867
|
|
| BLAKE2b-256 |
e30b3758c01bdae3ae1e97c1f6302a725e4c72c9b6277ef84ba8ded9a5e70be3
|