[Zope-dev] configuring global utilities in zcml
Hi All, Am I right in thinking there's no generic way to provide global utilities that require configuration using zcml? If I'm wrong, can someone please tell me how ;-) Otherwise, would it be possible to get the following to work: abc 1 bar cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] configuring global utilities in zcml
Nikolay Kim wrote: you can create utility in python file and then use component="" for example utility.py: class Utility(object): pass myUtility = Utility() configure.zcml: I'm aware of this but it kind of defeats the idea of seperating code and configuration... So, other ideas? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] configuring global utilities in zcml
Nikolay Kim wrote: I'm aware of this but it kind of defeats the idea of seperating code and configuration... So, other ideas? create new zcml directive. That seems pretty heavyweight :-/ Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] configuring global utilities in zcml
Hi, Am Dienstag, den 05.08.2008, 11:43 +0100 schrieb Chris Withers: > Nikolay Kim wrote: > >> I'm aware of this but it kind of defeats the idea of seperating code and > >> configuration... > >> > >> So, other ideas? > > > > create new zcml directive. > > That seems pretty heavyweight :-/ disagree, that sounds quite zopeish robert > > Chris ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] configuring global utilities in zcml
Robert Niederreiter wrote: Hi, Am Dienstag, den 05.08.2008, 11:43 +0100 schrieb Chris Withers: Nikolay Kim wrote: I'm aware of this but it kind of defeats the idea of seperating code and configuration... So, other ideas? create new zcml directive. That seems pretty heavyweight :-/ disagree, that sounds quite zopeish It seems strange that there is no generic way to configure a utility that requires parameters. For me, having a generic way would be zopeish ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] configuring global utilities in zcml
> I'm aware of this but it kind of defeats the idea of seperating code and > configuration... > > So, other ideas? create new zcml directive. ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )