[Zope] SkinScript: manage_FTPput / manage_FTPget

Jean Jordaan jean@upfrontsystems.co.za
Thu, 1 Nov 2001 15:34:17 +0200


Hi all

Roche Compaan has patched ZPatterns/SkinScript/Methods.py to
make skinscripts FTP-able. This is very useful if you do your
editing on the filesystem using sitecopy, for instance.

Here's the patch, against ZPatterns-0-4-3p2:

[jean@blommie SkinScript]$ diff Methods.py
/home/httpd/zope/Products/ZPatterns/SkinScript/Methods.py
121a122,125
>     def manage_FTPget(self):
>         "Get source for FTP download"
>         self.REQUEST.RESPONSE.setHeader('Content-Type', 'text/plain')
>         return self.read()
132a137,142
>     manage_FTPput = PUT
>
>     def read(self): return self.text
>     def get_size(self): return len(self.text)
>     getSize = get_size
>
146c156
<         ('Change SkinScript
methods',('manage_upload','PUT','manage_edit')),
---
>         ('Change SkinScript
methods',('manage_upload','PUT','manage_edit','manage_FTPget','body')),

Regards,
Jean Jordaan