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 hashes)
        
      
    Built Distribution
    
      
      Close
    
    
      
        
    
    
  
Hashes for cherrypy_jinja2-2.2-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 8adf8a189a39eed39a3e5a6fabdf512500971e370733e3ac90e377586ba51285 | 
            |
| MD5 | ff2409ec8adb429d546e7a5d534ea4c7 | 
            |
| BLAKE2b-256 | 296e283bf3b2d47f2732d25cb81753a18592c0fdb2105aeeb3bd3a2653fb6482 |