I don't know if it is CherryPy or Kid thing even MochiKit... but
there's strange about this. Maybe it is documented somewhere but I
couldn't found out.. anyway here you go.
First, I start with:
$ tg-admin quickstart
And when I done with it, I edit "projectname/controller.py" adding:
@turbogears.expose()
def doc(self):
return {"a":"a"}
And now I edit projectname/templates/welcomd.kid, adding:
<a href="/doc">a</a>
Now, when I load http://localhost:8080/, do you know what I get from
the console screen that prints out debug message?
=============================================
2005/11/11 03:49:52 HTTP INFO 127.0.0.1 - GET / HTTP/1.1
2005-11-11 03:49:52,096 turbogears.view DEBUG Recompiling template for
projectnamehere.templates.welcome
2005-11-11 03:49:52,099 turbogears.view DEBUG Applying template
projectnamehere.templates.welcome
127.0.0.1 - - [2005/11/11 03:49:52] "GET / HTTP/1.1" 200 1608
2005/11/11 03:49:53 HTTP INFO 127.0.0.1 - GET /doc HTTP/1.1
2005-11-11 03:49:53,443 turbogears.view DEBUG Recompiling template for
projectnamehere.templates.welcome
2005-11-11 03:49:53,447 turbogears.view DEBUG Applying template
projectnamehere.templates.welcome
127.0.0.1 - - [2005/11/11 03:49:53] "GET /doc HTTP/1.1" 200 1608
=============================================
Found anything strange?
127.0.0.1 - - [2005/11/11 03:49:53] "GET /doc HTTP/1.1" 200 1608
Maybe this! I didn't loaded "/doc". I loaded only "/".
Now, more strange thing is, whatever the page is when there is "<a
href="/doc">anything</a>" in the document, always that "/doc" page is
loaded. Other names like "<a href="/docomentation">anything</a>" did
not load.
So, maybe there is something special about "/doc". Any ideas?