Thanks!
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Marius Gedminas > Sent: 30. mai 2008 12:12 > To: zope3-users@zope.org > Subject: Re: [Zope3-Users] How can I determine (in code) if > the instance isrunning in devmode or not? > > On Wed, May 28, 2008 at 04:45:13PM +0200, Andreas Johnsen wrote: > > I want to insert some extra HTML from a viewlet manager > when running > > in devmode. How can I determine (in code) if the instance > is running > > in devmode or not? > > from zope.app.appsetup.appsetup import getConfigContext > > def is_devmode_enabled(): > """Is devmode enabled in zope.conf?""" > config_context = getConfigContext() > return config_context.hasFeature('devmode') > > Regards, > Marius Gedminas > -- > "Don't trust a statistic you haven't faked yourself." > -- Seen in another posting by Markus Kuhn > _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users