Change from turbogears.catwalk import CatWalk
to from turbogears.toolbox.catwalk import CatWalk On 1/26/06, JKR <[EMAIL PROTECTED]> wrote: > > Hi all, > > I tried to test catwalk feature, but it seems like it missing from the > latest source in trunk? or maybe I was wrong, I try to also look for > catwalk source in the my python site-packages turbogears directory but > no success. > > > D:\01_src\Wiki-30>python start-wiki30.py > Traceback (most recent call last): > File "start-wiki30.py", line 24, in ? > from wiki30.controllers import Root > File "D:\01_src\Wiki-30\wiki30\controllers.py", line 5, in ? > from turbogears.catwalk import CatWalk > ImportError: No module named catwalk > > my controller.py as below: > > import cherrypy > import turbogears > from turbogears import controllers > from turbogears import identity > from turbogears.catwalk import CatWalk > import model > > class Root(controllers.RootController): > catwalk = CatWalk(model) > > @turbogears.expose() > def index(self): > return(dict) > > @turbogears.expose(template="wiki30.templates.welcome") > def index(self): > import time > return dict(now=time.ctime()) > > @turbogears.expose( html=".templates.login") > def login(self, *args, **kw): > if hasattr(cherrypy.request, "identity_errors"): > msg= _("You must provide your credentials before accessing > this resource.") > previous_url= cherrypy.request.path > else: > msg= _("Please log in.") > previous_url= cherrypy.request.headers.get("Referer", "/") > cherrypy.response.status=403 > return dict(message=msg, previous_url=previous_url, > logging_in=True, > original_parameters=cherrypy.request.params) > > @turbogears.expose() > def logout(self): > identity.current.logout() > raise cherrypy.HTTPRedirect(turbogears.url("/")) > ~ > > -- [EMAIL PROTECTED]