CherryPy tool to render output through Jinja2 templates
Project description
CherryPy-Jinja2
CherryPy-Jinja2 is a simple CherryPy Tool to render output via Jinja2 templates.
Import cherrypy_jinja2
to make the tool available in CherryPy's default toolbox.
Set tools.jinja2.search_path
to a directory containing Jinja2 template files,
then attach the tool to exposed methods:
class Root:
@cherrypy.expose
@cherrypy.tools.jinja2(template="index.html")
def index(self):
return {'message': "Hello"}
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
cherrypy-jinja2-2.2.tar.gz
(6.2 kB
view details)
Built Distribution
File details
Details for the file cherrypy-jinja2-2.2.tar.gz
.
File metadata
- Download URL: cherrypy-jinja2-2.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 333ca4170bdc094d0dc93a58ea61770bae9bcafbfd8db82bb36f32e1defc6b0b |
|
MD5 | b5adf3474e972984c44bd1b9b4623efb |
|
BLAKE2b-256 | 9f76b1de0408ec5cae50598b2634a823cc75becfd4ff91f8bfd0bf9042d39b2e |
File details
Details for the file cherrypy_jinja2-2.2-py3-none-any.whl
.
File metadata
- Download URL: cherrypy_jinja2-2.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8adf8a189a39eed39a3e5a6fabdf512500971e370733e3ac90e377586ba51285 |
|
MD5 | ff2409ec8adb429d546e7a5d534ea4c7 |
|
BLAKE2b-256 | 296e283bf3b2d47f2732d25cb81753a18592c0fdb2105aeeb3bd3a2653fb6482 |