Martin Aspeli wrote:
Laurent Mignon wrote:
Hi,
With the replacement of zope.app.component import with zope.site, it's no more possible to use z3c.form with Zope2 / Plone :-(
In fact, zope.site require zope.container requiring ZODB3 :-(
Why can't you put these eggs into your Plone buildout? Are there version conflicts?
I can't find any solutions to solve this problem. It is really damage to lose the possibility of using z3c.form with zope2/plone ...
Yes. This would be a pretty big problem indeed, and one I hope we can avoid.
Martin
Hi Martin, As specified in a response to my own post, I've found a solution. The problem is probably due to a inappropriate dependency declaration in the zope.container module. In fact zope.container use ZODB3 for their tests but ZODB3 is declared in the install_requires list in place of extras_require into setup.py. Everything works fine after modifying the setup.py file. BUT I wonder if the way that z3c.form compute resource url stay compatible with zope2 from zope.site import hooks class ImageButtonAction(image.ImageWidget, ButtonAction): zope.component.adapts(interfaces.IFormLayer, interfaces.IImageButton) def __init__(self, request, field): action.Action.__init__(self, request, field.title) submit.SubmitWidget.__init__(self, request) self.field = field @property def src(self): site = hooks.getSite() src = zope.traversing.api.traverse( site, '++resource++' + self.field.image, request=self.request)() return src