Re: [Zope-dev] PUT_factory
Sorry for the personal mail (I click on response button but don't look if the correct direction is in the for box, Sorry!! It works Thank you very much - Original Message - From: "Chris McDonough" <[EMAIL PROTECTED]> To: "Garito" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, February 25, 2004 7:13 PM Subject: Re: [Zope-dev] PUT_factory > Hi, > > Please keep this on the list (for the benefit of other folks). > > Looks like you imported the ZopePageTemplate *module* instead of the > ZopePageTemplate *class*, e.g. you've got something like: > > from Products.PageTemplates import ZopePageTemplate > > instead of: > > from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate > > > - C > > > On Wed, 2004-02-25 at 13:09, Garito wrote: > > Hi Chris! Thank you for the help > > > > these is the traceback info: > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 100, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 40, in call_object > > Module webdav.NullResource, line 110, in PUT > > Module Products.Yanged.ConceptoYanged, line 88, in PUT_factory > > TypeError: 'module' object is not callable > > - Original Message - > > From: "Chris McDonough" <[EMAIL PROTECTED]> > > To: "Garito" <[EMAIL PROTECTED]> > > Cc: "Lista Oficial de Zope" <[EMAIL PROTECTED]> > > Sent: Wednesday, February 25, 2004 6:59 PM > > Subject: Re: [Zope-dev] PUT_factory > > > > > > > This looks about right. Maybe you could take a look at your error_log > > > object and see if you see any tracebacks after an attempted DAV/FTP > > > upload? > > > > > > On Wed, 2004-02-25 at 12:17, Garito wrote: > > > > Hi, all > > > > > > > > I try to override PUT_factory method in my container product > > > > > > > > I read in several webpages I need to create a PUT_factory method in my > > > > product to override these mechanism > > > > These method could be like: > > > > > > > > def PUT_factory(self, name, typ, body): > > > > return ZopePageTemplate(name, body, content_type=typ) > > > > > > > > In these case all the objects created by the WebDAV/FTP services will > > > > be ZopePageTemplates but these code doesn't work! :( > > > > > > > > Can anyone explain me the correct solution? > > > > > > > > Thanks!!! > > > > > > > > __ > > > > ___ > > > > Zope-Dev maillist - [EMAIL PROTECTED] > > > > http://mail.zope.org/mailman/listinfo/zope-dev > > > > ** No cross posts or HTML encoding! ** > > > > (Related lists - > > > > http://mail.zope.org/mailman/listinfo/zope-announce > > > > http://mail.zope.org/mailman/listinfo/zope ) > > > > > > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PUT_factory
Hi, Please keep this on the list (for the benefit of other folks). Looks like you imported the ZopePageTemplate *module* instead of the ZopePageTemplate *class*, e.g. you've got something like: from Products.PageTemplates import ZopePageTemplate instead of: from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate - C On Wed, 2004-02-25 at 13:09, Garito wrote: > Hi Chris! Thank you for the help > > these is the traceback info: > > Traceback (innermost last): > Module ZPublisher.Publish, line 100, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 40, in call_object > Module webdav.NullResource, line 110, in PUT > Module Products.Yanged.ConceptoYanged, line 88, in PUT_factory > TypeError: 'module' object is not callable > - Original Message - > From: "Chris McDonough" <[EMAIL PROTECTED]> > To: "Garito" <[EMAIL PROTECTED]> > Cc: "Lista Oficial de Zope" <[EMAIL PROTECTED]> > Sent: Wednesday, February 25, 2004 6:59 PM > Subject: Re: [Zope-dev] PUT_factory > > > > This looks about right. Maybe you could take a look at your error_log > > object and see if you see any tracebacks after an attempted DAV/FTP > > upload? > > > > On Wed, 2004-02-25 at 12:17, Garito wrote: > > > Hi, all > > > > > > I try to override PUT_factory method in my container product > > > > > > I read in several webpages I need to create a PUT_factory method in my > > > product to override these mechanism > > > These method could be like: > > > > > > def PUT_factory(self, name, typ, body): > > > return ZopePageTemplate(name, body, content_type=typ) > > > > > > In these case all the objects created by the WebDAV/FTP services will > > > be ZopePageTemplates but these code doesn't work! :( > > > > > > Can anyone explain me the correct solution? > > > > > > Thanks!!! > > > > > > __ > > > ___ > > > Zope-Dev maillist - [EMAIL PROTECTED] > > > http://mail.zope.org/mailman/listinfo/zope-dev > > > ** No cross posts or HTML encoding! ** > > > (Related lists - > > > http://mail.zope.org/mailman/listinfo/zope-announce > > > http://mail.zope.org/mailman/listinfo/zope ) > > > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PUT_factory
This looks about right. Maybe you could take a look at your error_log object and see if you see any tracebacks after an attempted DAV/FTP upload? On Wed, 2004-02-25 at 12:17, Garito wrote: > Hi, all > > I try to override PUT_factory method in my container product > > I read in several webpages I need to create a PUT_factory method in my > product to override these mechanism > These method could be like: > > def PUT_factory(self, name, typ, body): > return ZopePageTemplate(name, body, content_type=typ) > > In these case all the objects created by the WebDAV/FTP services will > be ZopePageTemplates but these code doesn't work! :( > > Can anyone explain me the correct solution? > > Thanks!!! > > __ > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://mail.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )