Skip to main content

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')]
                            }
                        })

Metadata

Release files for marbaloo_mako 0.1.1

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

Source distribution (sdist)

Source distribution for marbaloo_mako 0.1.1
File Size Uploaded
marbaloo_mako-0.1.1.tar.gz 2.9 kB Details

Release files / marbaloo_mako-0.1.1.tar.gz

Download URL marbaloo_mako-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
94b7e0b6ad7d237ea3692427d892471bc380b645ca54f0e245f1988a50c762f8
BLAKE2b-256 checksum
How to use checksums
21190d58137509b51dad0bc852afbbad7a4c68e3fc72452d39d885559bc7128d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

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