Re: [zope-dev] zope/apache - external product writing to a file system ?
When will you release the product? Also, what about the opposite effect: - An external method that **reads** existing HTML files from the file system? The possible application? Let�s say I host my website with a hosting service that does not support Zope directly. Yet, if I am able to install Zope on my personal disk space, I could get Zope running (on port :81, say) and then Zope would read and write the HTML files to the filesystem. The point: using Zope to *maintain* my site, through a web interface that is a lot friendlier than FTPing HTMl files up to the web hosting service. Just an idea. Regards. --- "Dr. Ross Lazarus" <rossl@med.usyd.edu.au> wrote:
We're running zope 1.10.2 under apache.
Briefly, my question is - What's the easiest way to convince apache/zope to allow an external method to actually write some files somewhere - do I only need to ask my friendly (!) sysadmin to adjust some apache permissions or is there more to this ?
Details - In order to get a static html representation of a zope folder and subfolder objects, I thought I'd write myself an external method which walks the folder structure and tries to write the dtml stuff to the file system as a static mirror of the dynamic zope site.
Problem. Everything seems to work fine except that all of the file writes fail - IOError 13 - permission denied.
I thought I'd be sneaky and tried using the zope/var directory assuming that apache was stopping zope from writing to any arbitrary directory. No joy - zope too smart to allow me to do that.
I'll release it as a contributed product if I can get this sorted out. (Yes, wget already does this but we've had some interesting problems...)
--
Dr Ross Lazarus Associate Professor and Sub-Dean for Information Technology Faculty of Medicine, A27, R126a, University of Sydney, Camperdown, NSW 2006, Australia Tel: (+61 2) 93514429 Mobile: +61414872482 Fax: (+61 2) 93516646 Email: rossl@med.usyd.edu.au http://www.health.usyd.edu.au/people/rossl.htm
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev
(For non-developer, user-level issues, use the companion list, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
=== = = = = = \ / = = = = = / \ = = = = = [PP] Jose C. Lacal jose.lacal@volks-pc.org Visit my website at http://www.volks-pc.org _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
It's easy to pull text/html files in to dtml methods or documents using an external method. I do it a lot to keep the zope ODB from blowing out - the filesystem is a good place to store bulky text and there are fine tools for editing html on any filesystem - much better than an html textbox ! I'll package up some external methods I use and send them to the zope site when I get a moment. Fully rendering dtml to an html string (same way zope does !) from an external method still eludes me. Happy to release the zope equivalent of wget once that's working. Anyone ? "PP Jose C. Lacal" wrote:
When will you release the product?
Also, what about the opposite effect: - An external method that **reads** existing HTML files from the file system?
The possible application?
Let´s say I host my website with a hosting service that does not support Zope directly. Yet, if I am able to install Zope on my personal disk space, I could get Zope running (on port :81, say) and then Zope would read and write the HTML files to the filesystem.
The point: using Zope to *maintain* my site, through a web interface that is a lot friendlier than FTPing HTMl files up to the web hosting service.
Just an idea.
-- Dr Ross Lazarus Associate Professor and Sub-Dean for Information Technology Faculty of Medicine, A27, R126a, University of Sydney, Camperdown, NSW 2006, Australia Tel: (+61 2) 93514429 Mobile: +61414872482 Fax: (+61 2) 93516646 Email: rossl@med.usyd.edu.au http://www.health.usyd.edu.au/people/rossl.htm
Fully rendering dtml to an html string (same way zope does !) from an external method still eludes me. Happy to release the zope equivalent of wget once that's working. Anyone ?
something like this works for me... dtmlstring = """ some <!--#var dtmlstuff --> blah blah blah """ Results = DocumentTemplate.HTML(dtmlstring) Results = apply(Results, (self, REQUEST), { 'dtmlstuff' : 'bananas' } ) where 'self' is the instance, REQUEST the request object (if you have things there that you want to look up) or are you also talking about recursing, doing lookups, &c? Anthony
On 1 Jun 1999 10:15:01 -0500, Dr. Ross Lazarus wrote:
It's easy to pull text/html files in to dtml methods or documents using an external method. I do it a lot to keep the zope ODB from blowing out
Fully rendering dtml to an html string (same way zope does !) from an external method still eludes me. Happy to release the zope equivalent of wget once that's working. Anyone ?
This is almost trivial to implement. My filesystemed database app looks for *.dtml files as it's walking the fs and loads them as dtml methods of the SubDir (folderish) object in which they reside. You can use DTMLMethod.add() or handle it directly with the DTMLMethod class. Just send the file contents as the "file=" argument. Acquisition works just like with zope dtml methods, though you may well need to futz with the object __roles__ when you add it. You also would need to add an 'update' method for the dtml file, which I haven't gotten around to yet. I just restart the server right now if I need to edit one. :^) Since you can read the dtml source in before creating the method, you have the opportunity to handle any potential metadata that you may want to store in the dtml source... Kent
participants (4)
-
Anthony Baxter -
Dr. Ross Lazarus -
kent@tiamat.goathill.org -
PP Jose C. Lacal