> > On Jan 27, 2007, at 10:38 PM, Ian Bicking wrote:
> > Also I think there's a config file inside TG projects, right?
> > While you
> > can do that, I prefer just putting that into Python code.  So that
> > means
> > any stuff that isn't optional or shouldn't be configured on deployment
> > goes into Python code.  I haven't kept up with TG on this, but I
> > seem to
> > remember it was putting some of that stuff into config files inside
> > the
> > package.
> On 28/01/07, Alberto Valverde <[EMAIL PROTECTED]> wrote
> Yep. TG loads configuration files from the "config" package inside TG
> apps. Those config files are loaded with ConfigObj to allow python
> values.

(Apologies if this is well understood and has been discussed before)

When combined with the current (TG1.0) widget system having to do:
`from turbogears import config` to access / modify configuration
values creates a boot strapping issue.  As soon as the top level
import fires the widgets get instantiated.

This is particularly irritating when you want to use custom
TemplateLoader instance with genshi templates in order to handle
x-include paths - you can not load the paths using the turbogears
config system because the widgets tend to load templates on
instantiation.

Is it possible to at least tweak the __init__ imports in TG to prevent
`from turbogears import config` from instantiating widgets ?

(I personally cant stand this trend for placing configuration files in
python packages but understand I'm in the minority)


Robin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to