Skip to content
Create a gist now

Instantly share code, notes, and snippets.

canvas example
from canvas import HtmlCanvas
from bottle import run,route
def render(page):
canvas = HtmlCanvas()
return canvas.render(page)
class BasePage(object):
def render_on(self, canvas):
with canvas.head():
with canvas.body():
with canvas.div(id='content'):
def render_content_on(self, canvas):
class HomePage(BasePage):
title = 'Home'
def render_content_on(self, canvas):
def index():
return render(HomePage())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.