[z3-five] Adaptation in untrusted code
Maciej Wisniowski
maciej.wisniowski at coig.katowice.pl
Thu Nov 16 15:21:23 CET 2006
>> I need to do the following in a python script or a page template:
>>
>> IRender(obj).render(context)
>
> I think you need a view. :)
>
> Seriously, views make your life so much easier when it comes to doing
> anything not completely trivial with rendering/display logic. For me, at
> least, they've also made me more productive
And what if there is nothing to do with rendering/display?
I have written simple adapter for RAMCacheManager that allows me
to flush individual cache entries. It would be nice if I'll be able
to call from one Script (Python) something like:
from Products.RAMCacheManagerPlus.interfaces import ICacheablePlus
ICacheablePlus(context.secScript).invalidate(
keywords_req={'AUTHENTICATED_USER':request.AUTHENTICATED_USER}
partial = 1)
where ICacheablePlus is my adapter and
context.secScript is Script(Python) with caching enabled.
It works from external methods and Products, but not from the
'content space'.
I tried some things but seems it can't be done. You may take a look here:
(http://code.google.com/p/ramcachemanagerplus/)
and:
http://ramcachemanagerplus.googlecode.com/svn/trunk/configure.zcml
--
Maciej Wisniowski
More information about the z3-five
mailing list