On Dec 7, 2006, at 4:01 PM, Ed Singleton wrote:
>
> PS Where's the best place to import new?  Should I do it in the
> controller, or just remember to do it on every page where it is used?

You can import it anywhere as long as it's in __init__'s scope, that is:

1) import it inside __init__
2) import it at the module your controller class is declared in
3) import it in anywhere and bind it to __builtins__ so it's  
available everywhere

I'd go with 2), I would only do it in 1) if you need to deal with  
circular imports (which wouldn't be the case as "new" won't be  
importing anything from your app).  3 was more of a joke really... :P

Alberto

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