On 12/1/06, flyingfrog <[EMAIL PROTECTED]> wrote: > Ok, i solved everything! > The mistake was in the way I was importing my modules: i was doing it > like "import <modulename>", while i had to do it like "from > <modulename> import *" even if i don't understand why.
When you do import model Only the 'model' object is visible in the rest of the file, to access something in your model, say Foo, you need to do model.Foo If you do from model import Foo Then 'Foo' is visible to the rest of the file. The 'from model import *' is equivalent to listing out every top level class and function in the imported module unless you define __all__. Check the Python tutorial for details on how importing and namespaces work. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

