Hi,
>controllers/root.py loks like this:
>---
>from turbogears import controllers, expose, flash
>
>
Add: from customer import Customer
>class Root(controllers.RootController):
>
> foo = Customer()
>
> @expose(template="w00tztest.templates.welcome")
> def index(self):
> import time
> flash("Your application is now running")
> return dict(now=time.ctime())
>---
>
>and controllers/customer.py looks like this:
>---
>from turbogears import controllers, expose, flash
>
>class Customer(controllers.Controller):
> @expose(template="w00tztest.templates.welcome")
> def index(self):
> import time
> flash("this is from the customer controller!")
> return dict(now=time.ctime())
>---
>
>When starting the app, CherryPy crashes with the error:
> File "root.py", line 9, in Root
> foo = Customer()
>NameError: name 'Customer' is not defined
>
>What am I doing wrong here?
>
>
>>
>
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---