Problema con TurboGears

Guillermo gheize-Re5JQEeQqe8AvxtiuMwx3w en public.gmane.org
Sab Ago 11 00:32:06 CEST 2007


Hola lista hace un tiempo que me sumergí en el mundo de python y mas
corto todavía en el de TurboGears y se me presento un problema y no
puedo continuar desarrollando. Les cuento:

Después de crear un proyecto, y comprobar que el funciona correctamente
el welcome.kid mostrado desde el http://localhost:8080/
Cuando quiero añadir un nuevo template (hello.kid) referenciarlo desde
http://localhost:8080/hello me da el siguiente error:

404 Not Found
The path '/hello' was not found.
Page handler: "The path '/hello' was not found."
Traceback (most recent call last):
 File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/_cphttptools.py", line 105, in _run
    self.main()
  File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/_cphttptools.py", line 246, in main
    page_handler, object_path, virtual_path = self.mapPathToObject(path)
  File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/_cphttptools.py", line 312, in mapPathToObject
    raise cherrypy.NotFound(objectpath)
NotFound: 404

Y al comprobar hello.kid desde desde el firefox, éste se carga correctamente.
El nuevo template esta almacenado en la carpeta /miProyecto/miProyecto/templates

Les dejo el archivo controllers.py
[...]
class Root(controllers.RootController):
    @expose(template="hello.templates.welcome")
    def index(self):
        import time
        flash("Your application is now running")
        return dict(now=time.ctime())

    @expose(template="hello.templates.hello")
	def a(self):
	return  "Hola  mundo en lo de manuel"

Desde ya muchas gracias. Saludos! :)







Más información sobre la lista de distribución Python-es