view 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
line wrap: on
line source
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())
Copyright (C) 2012-2017 Edgewall Software