[Zope] Python/Zope API
Alexandre A. Rodioukov
simuran@home.com
30 Jul 2000 17:32:07 -0600
Hello folks.
I want to be able to render Zope objects from my python external
method/product. Idea is to use it to render parent object. Here is
code I came up so far with:
def view(self, REQUEST):
if self.meta_type == 'Folder':
doc = self.aq_base.index_html(self, self.REQUEST)
else:
doc = self.aq_base(self, self.REQUEST)
return doc
It does return rendered parent object, but I have some questions and
probably request for improvement ideas :)
1. The whole thing becomes broken with SiteAccess. Complains about
premissions/PhysicalRoot (AFAIR)
2. Are there ways to improve it? For example I would love to know how
you can check if you can actually render an object. (For example
you can not render Control_Panel).
Possible use for it (to make the whole idea a bit clearer)
/index_html (some stuff in it)
/view (above code in external method)
/index_html/view returns rendered index_html doing some magic with
HTML/whatever is in it (for example encrypts it with public key, strips
down carriage returns/tabs/spaces etc...) In other words acts as a
filter.
Thanks for any advice,
Regards, Simuran.