From ree at ree.hu Mon Mar 20 15:25:54 2006 From: ree at ree.hu (Balazs Ree) Date: Mon Mar 20 15:32:15 2006 Subject: [z3] concatresource directive preview Message-ID: Hi, in the frame of the jsonserver product development I made a small zcml directive called concatresource. It is a lightweight solution for publishing a resource by concatenating more files and compressing the result. It can be used like this: It works with Five in Zope2.8 and in Zope3.2. I decided to develop this because - I wanted to learn how to do it - I need to deploy it for jsonserver and AZAX - I could not use Plone's ResourceRegistries because I want a zope-only solution - I could not use zc.resourcelibrary because it would require zope2.10 for the TAL namespace extensions - I need something that works in Z2 and Z3, today - (both products do more, this is simpler) It can be previewed at http://codespeak.net/svn/z3/jsonserver/branch/merge/concatresource and can be used as a separate product on its own. During this I had to deal with caching and the autorefresh of files. It turned out that there is a trivial bug in Five, in the file resource.py the line header = request.environ.get('If-Modified-Since', None) is actually wrong, it never gets the header. For Five it should be header = request.get_header('If-Modified-Since') for zope3 it should be (and it is correctly) header = request.getHeader('If-Modified-Since', None) But even that fixed it would not work. Since the problem that both Z3 and Five have is that although they attempt to handle the expiration, the modification date of a file is read only once from the disk, on startup. So you need a restart to refresh the resources. In other words, refreshing of resources is currently broken in both Five and Z3. I implement that correctly in concatresources and my solution could be used in the Five and zope3 base resource handling similarly. (I can volunteer to fix that.) The packer.py file that does the javascript and css packing is used with kind permission of Florian Schulze but it's taken from Plone where it has GPL, consequently we have a possible license issue that needs to be solved... so take care please, at the moment it's just demo. Any feedback is highly appreciated. -- Balazs Ree From l at lrowe.co.uk Wed Mar 22 14:48:30 2006 From: l at lrowe.co.uk (Laurence Rowe) Date: Wed Mar 22 15:02:25 2006 Subject: [z3] Project Submission Request - ldapbrowser Message-ID: Hi all, I'm currently developing an ldap browser application for Oxfam's global directory project. It's built in zope 3.2 and will be a fairly simple tool to search for people in the ldap directory and display their details. Proposed licence: BSD like module/svn name: ldapbrowser It has dependencies on zc.table and ldapadapter from zope svn. I imagine it'll be a few weeks before it is in a state were I can check it in. Regards, Laurence (elro on irc) From philipp at weitershausen.de Sat Mar 25 15:30:10 2006 From: philipp at weitershausen.de (Philipp von Weitershausen) Date: Sat Mar 25 15:28:23 2006 Subject: [z3] Re: Project Submission Request - ldapbrowser In-Reply-To: References: Message-ID: <442553F2.8080305@weitershausen.de> Laurence Rowe wrote: > I'm currently developing an ldap browser application for Oxfam's global > directory project. It's built in zope 3.2 and will be a fairly simple > tool to search for people in the ldap directory and display their details. > > Proposed licence: BSD like > > module/svn name: ldapbrowser > > It has dependencies on zc.table and ldapadapter from zope svn. > > I imagine it'll be a few weeks before it is in a state were I can check > it in. No objections from me. Philipp