Le dimanche 06 mai 2007 à 15:56 -0700, iain duncan a écrit :

[...]

> Does that mean the widget should be instantiated in the root controller
> class namespace instead of in a local method? I've got a feeling I've
> been picking flexibility over performance in a bad way if that is the
> case ... :/

I generally write my widgets (and validators) in a separate file
(widgets.py doh?) and import what I need from this file into my
controllers.py

I think Alberto does the same.

It forces you to pass values to the widget at render time and can become
somewhat tricky at times... but at least you don't create a new object
(and a complicated one that is) on each page hit on your server...

Regards,
Florent.


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