On 3/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Did that still failed, here are the two files (basically copied from
> wiki20 tutorial),
> any other suggestion, thanks in advance for your help.

The NameError usually indicates that you haven't imported something
correctly. In this second error, you got the main turbogears import,
but you missed the controllers import.

At your stage in the tutorial, controllers.py should be:

import cherrypy
import turbogears
from turbogears import controllers
from turbogears import identity
from turbogears import validators

from model import Page
from docutils.core import publish_parts

class Root(controllers.RootController):
    @turbogears.expose(template=".templates.page")
    def index(self,pagename="FrontPage"):
        page = Page.byPagename(pagename)
        content = publish_parts(page.data,
writer_name="html").get("html_body","")
        return dict(data=content, pagename=page.pagename)

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to