[Web-SIG] PasteDeploy comments

Ian Bicking ianb at colorstudy.com
Sat Mar 3 22:48:56 CET 2007

Jim Fulton wrote:
> On Mar 2, 2007, at 8:17 PM, Ian Bicking wrote:
>> Jim Fulton wrote:
>>>   What have you used global configuration data for?
>> It's often meant for configuration that applies to many components.  
>> For instance, a "debug" value that applies widely (or could also be 
>> applied locally).  Or information about where to email errors, some 
>> logging information, etc.  E.g., you might give a base directory for 
>> logging in global_conf, and an application could pick that up and 
>> probably put it in a subdirectory there (where if you configured it 
>> locally, you'd probably give the application the full path of the log 
>> file).
> I know what it's meant for.  I was asking what it was actually *used* 
> for.  Is this truly useful?

An example that would probably apply to Zope: you have several Zope 
apps, but they aren't at the "top" of the website.  That is, there's 
some dispatchers and middleware before you get to them.  If you want 
them all to use some common configuration -- stuff like the location of 
the ZODB -- you might set those values globally, and if the applications 
specifically picked those up (which I would expect) then that would be 

Some configuration values don't make any sense to set globally, and 
applications can require local settings (or require that there are no 
extra local settings), so I think the distinction is nice.  I initially 
planned to just fold all the configuration into one set of keywords, but 
Phillip talked me out of it.  It would mean that every application would 
have to take a bunch of keyword arguments they would ignore (since there 
might be global settings that didn't apply to them), and they could 
unintentionally pick up global arguments that only coincidentally 
matched local settings.

Not having *any* global settings would be doable.  You'd have to use a 
lot more of the "get" option that Paste Deploy uses, or maybe if it had 
an option to draw in the settings from another section (e.g., you'd set 
up one zodb section and draw in from it in all your apps).  You'd have 
to know where those settings applied, you wouldn't coincidentally get 
those values, nor would you be as likely to give good site-wide defaults 
where general defaults were acceptable.

Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org

More information about the Web-SIG mailing list