[Grok-dev] does product-config work with paster?
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Fri Jan 29 05:33:29 EST 2010
Jan-Wijbrand Kolman <janwijbrand at gmail.com> wrote:
> For me, product config seems to work:
>
> Tested with grok-1.0, with paster, mu zope_conf part in buildout.cfg looks
like
> this::
>
> [zope_conf]
> recipe = collective.recipe.template
> input = etc/zope.conf.in
> output = ${buildout:parts-directory}/etc/zope.conf
> filestorage = ${buildout:directory}/var/filestorage
> blobstorage = ${buildout:directory}/var/blobstorage
> logfiles = ${buildout:directory}/var/log
> extra =
> <product-config configurare>
> test 1 2 3
> </product-config>
>
> And the app.py looks like this::
>
> import grok
>
> class Configurare(grok.Application, grok.Container):
> pass
>
> class Index(grok.View):
>
> def update(self):
> from zope.app.appsetup.product import getProductConfiguration
> print 'CCC', getProductConfiguration('configurare')
>
> When I open this view, I indeed get this printed on the console::
>
> CCC {'test': '1 2 3'}
>
> I'm now about to test with the latest grok alpha...
It doesn't work with later Grok versions.
Somehow the product configuration fix that was done on the zope.app.wsgi 3.4
branch has not been properly applied on the trunk-at-that-time. So, anything
released from the zope.app.wsgi trunk since then, does not have this feature.
I'll try to fix it in zope.app.wsgi and try to get pypi rights for it to release
a bug fix version. People can then pin to this version in their applications for
the time being, until we have a newer grok release.
regards, jw
More information about the Grok-dev
mailing list