Mercurial > genshi > genshi-test
comparison examples/turbogears/markuptest/controllers.py @ 4:f8612f05af99
Added first stab of an implementation of the !TurboGears [http://www.turbogears.org/docs/plugins/template.html plugin API for template engines], and also a !TurboGears-based example using this plugin. Both written by Matt Good.
author | cmlenz |
---|---|
date | Sat, 03 Jun 2006 12:31:58 +0000 |
parents | |
children | 44fbc30d78cd |
comparison
equal
deleted
inserted
replaced
3:e86dcec16d55 | 4:f8612f05af99 |
---|---|
1 import logging | |
2 | |
3 import cherrypy | |
4 | |
5 import turbogears | |
6 from turbogears import controllers, expose, validate, redirect | |
7 | |
8 from markuptest import json | |
9 | |
10 log = logging.getLogger("markuptest.controllers") | |
11 | |
12 class Root(controllers.RootController): | |
13 @expose(template="markuptest.templates.welcome") | |
14 def index(self): | |
15 import time | |
16 log.debug("Happy TurboGears Controller Responding For Duty") | |
17 return dict(now=time.ctime()) |