Re: [Zope] how to use LocalFS to expose F/S directory?
: OdesÃlatel: Bill Andrews <bill_j_andrews@yahoo.com> : Have installed (I think) LocalFS but don't understand how to expose a : : directory such as /tmp/foo within the zope URL hierarchy. I expected : to see a new file type "LocalFS portal" or something in the "Add" : pulldown menu. Select [Add Local Filesystem], fill ID : I read a message from ~a year ago by Johnathan, the LocalFS author, : saying it wasn't being kept up to date. and then directory, for example /var/log and you will see all your *nix logs. : Please advise or point me to docs - the sourceforge and zope.org : pages have no examples, and I'm not sure it's working properly. As easy as product dont need doc. JL.
Salut, is there any way to render a page template file that is located on the hard disk? Code excerpt in a product: def foo(self): pt = PageTemplateFile('show.zpt', _prefix=skins_prefix) print pt # prints <PageTemplateFile at 0x89c5000> return pt() # --> error There is nothing wrong with the page template (actually it doesn't contain any tals just plain text). (The idea behind this is that I want to decide which template to show. So the skins_prefix may change.) But rendering will fail. Thanks a lot, Jens. Appendix Error Type: AttributeError Error Value: other ... Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.cms2.products.documentpool.DocumentPoolIndex, line 73, in show Module Shared.DC.Scripts.Bindings, line 252, in __call__ Module Shared.DC.Scripts.Bindings, line 281, in _bindAndExec Module Shared.DC.Scripts.Bindings, line 1, in ? Module Shared.DC.Scripts.Bindings, line 232, in _getTraverseSubpath
Jens Dobberthin wrote at 2003-6-24 12:39 +0200:
is there any way to render a page template file that is located on the hard disk?
Code excerpt in a product:
def foo(self): pt = PageTemplateFile('show.zpt', _prefix=skins_prefix) print pt # prints <PageTemplateFile at 0x89c5000> return pt() # --> error
You page template is not acquisition wrapped (and therefore cannot define "here", "container", ... Try: pt= PageTemplateFile(...).__of__(self) Dieter
Dieter Maurer wrote:
You page template is not acquisition wrapped (and therefore cannot define "here", "container", ...
Try:
pt= PageTemplateFile(...).__of__(self)
Dieter, is __of__() documented anywhere? Is it a new method? I haven't seen it before. regards Max M
participants (4)
-
Dieter Maurer -
Jaroslav Lukesh -
Jens Dobberthin -
Max M