Hello,

Version 1.0b1. All default installation without error, test /index page
success. But when i am trying to add new page and write a few things in
controller.py, I got this error. it seems that tg could not find my
.KID file. I copied error detail message, controllers.py and .kid file
in following, hope you can advise, thanks a lot!

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

Powered by CherryPy 2.2.1

------controller.py add this piece-------
        @expose(template="test1.templates.pagelist")
        def pagelist(self):
                pages = [item.shortname for item in
Items.select(orderBy=Items.q.shortname)]
                return dict(pages=pages)

------pagelist.kid file, copy from sample with a little modify------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
xmlns:py="http://purl.org/kid/ns#";
    py:extends="'master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"
py:replace="''"/>
<title> Page Listing - 20 Minute Wiki</title>
</head>
<body>
    <div id="main_content">
        <h1>All Of Your Pages</h1>
        <ul>
            <li py:for="shortname in pages">
            <a href="${tg.url('/' + shortname)}"
                py:content="shortname">Short Name Here.</a>
            </li>
        </ul>
    </div>
</body>
</html>


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to