[Zope3-dev] small problem in zc.page?

Martijn Faassen faassen at infrae.com
Thu Jul 7 12:51:00 EDT 2005


Hi there,

First of all, zc.page's form machinery is holding up pretty well so far, 
thanks!

I did notice what might be a small problem though -- when using a 
zc.page EditForm in the Zope 3.1 beta, I get the following error when 
submitting it:

TypeError: ('Could not adapt', <zope.publisher.browser.BrowserRequest 
instance 
URL=http://localhost:8080/doclib/documents/1551575995/@@edit_document>, 
<InterfaceClass zope.interface.common.idatetime.ITZInfo>)

This is caused by the around this line:

             status = _("Updated on ${date_time}",
                        mapping={'date_time':
                                 formatter.format(
                                    datetime.datetime.now(,
                                      idatetime.ITZInfo(self.request)
                                       )
                                    )
                         }
                        )

Just passing in datetime.datetime.now() without trying to adapt the 
request to ITZInfo makes it work.

This adaptation did seem to work in older Zope 3 versions, so perhaps an 
adapter is not registered anymore that was before?

Regards,

Martijn


More information about the Zope3-dev mailing list