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
signature.asc
Description: Digital signature
_______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users