Global constants in Zope
I'd like to define global constants for my web application built with Zope but I'm not sure in what kind of object to define them. Is there any way to import an external python module in scripts, ZPTs, etc? Are there alternative approaches? Thanks in advance. --Borislav
You can import into Script Python objects, just fiddle with the permissions as outlined in the Script Python documents and then import your constants. -- Andy McKay Agmweb Consulting http://www.agmweb.ca ----- Original Message ----- From: "Borislav" <borislavd@gmx.net> To: "zope" <zope@zope.org> Sent: Friday, September 06, 2002 9:27 AM Subject: [Zope] Global constants in Zope
I'd like to define global constants for my web application built with Zope but I'm not sure in what kind of object to define them. Is there any way to import an external python module in scripts, ZPTs, etc? Are there alternative approaches?
Thanks in advance.
--Borislav
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
The simplest way would be to just define properties on the root folder. Then they would be visible and changeable from the ZMI. -Casey On Friday 06 September 2002 12:27 pm, Borislav wrote:
I'd like to define global constants for my web application built with Zope but I'm not sure in what kind of object to define them. Is there any way to import an external python module in scripts, ZPTs, etc? Are there alternative approaches?
Thanks in advance.
--Borislav
Casey Duncan <casey@zope.com> writes:
The simplest way would be to just define properties on the root folder. Then they would be visible and changeable from the ZMI.
Or you could do what we have done: write a Windows registry like product (for some reason ours is called eDitoRegistry) that offers an hierarchical structure that is saved outside the ZODB (for the usual reasons) in one or more XML files. You can "mount" these XML files containing (sub)trees at a chosen point in the tree. Somehow like the Unix file system.
participants (4)
-
Andy McKay -
Borislav -
Casey Duncan -
Nils Kassube