comparison 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
comparison
equal deleted inserted replaced
3:518a8520a6e1 4:49364e784c47
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())
Copyright (C) 2012-2017 Edgewall Software