Re: [Zope-dev] GenericSetup sans (Python) package?

2011-01-23 Thread yuppie
Hi!


Alex Clark wrote:
 I want to add GenericSetup (GS) profiles outside Python packages (i.e.
 in the buildout via ZCML). Currently GenericSetup expects to be passed a
 context which is (I think) the old-style Zope 2 product object in the
 ZODB. But I can’t think of a reason why GS couldn’t be made to work sans
 that requirement (I’m just speculating though, I haven’t looked at the
 code yet).
 ---


 Should I bother checking out the Products.GenericSetup source code to
 see if something like this is possible?

Currently the ZCML directive expects a 'directory' relative to the 
package root. The implementation looks up the package in the context 
provided by zope.configuration. The directive only works if the 
'package' attribute of the context is not None.

AFAICS the path() method of the context could be used if package is 
None. The profile registry and all code using it should already work 
without specifying a 'product' if a full 'path' is set instead of a 
relative. ('product' is just an old name in the code. Could be any 
Python package.)

 I really, really, really, don't want to create a Python package just so
 I can save a couple settings in my (Plone) site.

Usually I need more site specific stuff than just a profile, so I can't 
see a big win.

Anyway: +1 for making the ZCML directive work if package is None


BTW: GenericSetup related questions are generally discussed on the 
Zope-CMF list.

Cheers,

Yuppie
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


[Zope-dev] GenericSetup sans (Python) package?

2011-01-22 Thread Alex Clark
Hi all,

I floated an idea in a blog entry recently (here: 
http://blog.aclark.net/2011/01/19/new-website-for-2011/#todo) and I'm 
wondering if it's an attainable goal, or just a pipe dream:

---
I want to add GenericSetup (GS) profiles outside Python packages (i.e. 
in the buildout via ZCML). Currently GenericSetup expects to be passed a 
context which is (I think) the old-style Zope 2 product object in the 
ZODB. But I can’t think of a reason why GS couldn’t be made to work sans 
that requirement (I’m just speculating though, I haven’t looked at the 
code yet).
---


Should I bother checking out the Products.GenericSetup source code to 
see if something like this is possible?


I really, really, really, don't want to create a Python package just so 
I can save a couple settings in my (Plone) site.


Any thoughts appreciated,


Alex




-- 
Alex Clark · http://aclark.net
Author · http://aclark.net/admin

___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )