calabris schrieb:
> class Root(controllers.RootController):
>     @expose()
>     def index(self):
>         return "<h1>Hello World</h1>"
> 
>     @expose()
>     def default(self, *args, **kw):
>         return "This page is not ready"
> 
>     sub = SubController()
> 
> However, at least on my setup (Python 2.5, TG1.0.4b3, WinXP), CherryPy
> won't pick up on the subcontrollers unless they are listed *first*,
> before any function definitions. Otherwise I get a 404 from
> mapPathToObject.

Sorry, I can't reproduce that. I quickstarted a fresh TG app with TG
1.0.4b3, Py 2.5, Ubuntu 7.04, and pasted the controller code from the
page into controllers.py, and everything works as explained. I can access

http://localhost:8080/        --> "Hello TurboGears"
http://localhost:8080/foo     --> "This page is not ready"
http://localhost:8080/sub/    --> "Hello TurboGears"
http://localhost:8080/sub/foo --> "Hello World"

I fixed the heading though.

Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Docs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-docs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to