Marbaloo Mako 0.1.1 | GitLocker.com Product

marbaloo_mako 0.1.1

Last updated:

0 purchases

marbaloo_mako 0.1.1 Image
marbaloo_mako 0.1.1 Images

Free

Languages

Categories

Add to Cart

Description:

marbaloo mako 0.1.1

Mako template support for cherrypy.

Installation
pip install marbaloo_mako


Usage
# templates/dir1/index.mak
<h1>Today: ${today}</h1>
# app.py
import os
import marbaloo_mako
import cherrypy
from datetime import date
cherrypy.tools.mako = marbaloo_mako.Tool()

class Root(object):
@cherrypy.expose
@cherrypy.tools.mako(filename='/index.mak')
def simple(self):
return {'today': date.today()}

root_path = os.path.dirname(__file__)
cherrypy.quickstart(Root(), '/', {
'/': {
'tools.mako.on': True,
'tools.mako.directories': [os.path.join(root_path, 'templates/dir1')]
}
})

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.