Re: Zope 2.12 and Globals.DevelopmentMode

Sylvain Viollon <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Organization Infrae
Message-ID <[email protected]>
On Sat, 06 Feb 2010 02:14:07 -0500
Tres Seaver <[email protected]> wrote:

   Hello,

> 
> There was never any guarantee that Globals would be fully popluated
> before the start of product initialization:  third-party code needs to
> defer checking that flag at "import" time (which is the point of the
> pattern Hanno outlines).
> 
> An even better pattern would probably be to avoid the Globals "dumping
> ground" altogether and use the configuration object directly:
> 
>   from App.config import getConfiguration
>   config = getConfiguration()
>   if config.debug_mode:
>      ....
> 

   As matter of fact I tried that. And it always returned False
   (that's why I posted that mail at first). I have to review my setup,
   to see if there is something wrong, before I can continue to argue.

   I am using buildout and plone.recipe.zope2instance.

   Regards,

   Sylvain,


-- 
Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.