Martin Aspeli wrote:
> Laurent Mignon wrote:
>> 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
>> 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.
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):
def __init__(self, request, field):
action.Action.__init__(self, request, field.title)
self.field = field
site = hooks.getSite()
src = zope.traversing.api.traverse(
site, '++resource++' + self.field.image,
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -