[Zope] A function like a FTP Object
Garito
garito at sistes.net
Sun Jul 3 14:09:07 EDT 2005
Peter Bengtsson escribió:
>Sure you can. Any object/method that is in Zope becomes available via FTP.
>Some example code::
>
>class MyProduct(Folder):
> def struct_xml(self):
> return "<tag>1</tag>"
> def PUT(self, REQUEST, RESPONSE):
> if not REQUEST.get('BODY'):
> get_transaction.abort()
> RESPONSE.setStatus(405)
> else:
> body = REQUEST.get('BODY')
> self._save_struct_body(body)
> RESPONSE.setStatus(204)
> return RESPONSE
>
>
>setattr(MyProduct, 'struct.xml', MyProduct.struct_xml)
>
>
>
>On 7/3/05, Garito <garito at sistes.net> wrote:
>
>
>>Hi all
>>I would like to create a product with a function called struct.xml
>>
>>I would like if I could access it via FTP because I would like editor
>>integration
>>
>>I open the file via FTP and I save it via FTP and PUT_factory mechamism
>>
>>Can I make struct.xml accesible via a FTP file?
>>
>>Thanks!!!
>>
>>--
>>Mis Cosas
>>http://blogs.sistes.net/Garito/
>>
>>
>>_______________________________________________
>>Zope maillist - Zope at zope.org
>>http://mail.zope.org/mailman/listinfo/zope
>>** No cross posts or HTML encoding! **
>>(Related lists -
>> http://mail.zope.org/mailman/listinfo/zope-announce
>> http://mail.zope.org/mailman/listinfo/zope-dev )
>>
>>
>>
>
>
>
>
Hi!
does this work on a folder?
The struct.xml function is on a folder object and I would like
struct.xml as an object contained by the folder one
Thanks!
--
Mis Cosas
http://blogs.sistes.net/Garito/
More information about the Zope
mailing list