Mercurial > genshi > mirror
diff examples/turbogears/markuptest/controllers.py @ 4:49364e784c47 trunk
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 | 64ff134868c4 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/examples/turbogears/markuptest/controllers.py @@ -0,0 +1,17 @@ +import logging + +import cherrypy + +import turbogears +from turbogears import controllers, expose, validate, redirect + +from markuptest import json + +log = logging.getLogger("markuptest.controllers") + +class Root(controllers.RootController): + @expose(template="markuptest.templates.welcome") + def index(self): + import time + log.debug("Happy TurboGears Controller Responding For Duty") + return dict(now=time.ctime())