[z3-five] Z3/Five-views and portal_skins: some progress.

Lennart Regebro regebro at nuxeo.com
Fri Dec 10 15:50:35 MET 2004


Sidnei da Silva wrote:
> On Mon, Dec 06, 2004 at 06:56:30PM +0100, Lennart Regebro wrote: |
> Sidnei da Silva wrote: | >In theory, you can register all the CMF
> skins as views. I had created | >a directive for doing that (I think
> it's still in Five). | | is that the five:skinsDirectory directive? I
> saw some commented out code | using that, but it seems like the
> actual directive is gone now...
> 
> Yes. You may be able to rescue it from history, or it may be on a 
> branch.

I found it (after getting the brilliant idea to Google for it, I could
find a revision where it was checked in!).

> However, there are some incompatibilities, like here -> context and
> the absence of the test() operator. If you can fix those, you are 99%
> done.

Mapping here to context is a trivial excersize, but then something else 
quite interesting happens; I can now call the maste macro in the 
main_template. Fine, fine. This will of course call a python script (in 
this case get_permalink.py) through acquisition. Now, it will be called 
(I think) without a security context, and hence fail. Ho hum.

Do anybody have ideas of how to solve that?

Error message:
-------------------
     *  Module zope.tales.tales, line 698, in evaluate
       URL: 
/home/zopes/Five/Products/CMFDefault/skins/zpt_generic/main_template.pt
       Line 303, Column 1
       Expression: <PathExpr standard:'here/get_permalink | nothing'>
       Names:

{'args': (),
  'context': <Calendar instance at 41818ef0>,
  'default': <object object at 0x402d6480>,
  'here': <Calendar instance at 41818ef0>,
  'loop': {},
  'nothing': None,
  'options': {},
  'repeat': {},
  'request': <HTTPRequest, 
URL=http://localhost:8080/cmf/calendar/view.html>,
  'template': <Products.Five.browserconfigure.FivePageTemplateFile 
object at 0x4173e24c>,
  'usage': <zope.pagetemplate.pagetemplate.TemplateUsage object at 
0x4190210c>,
  'view': <SimpleViewClass from 
/home/zopes/Five/Products/CPSSharedCalendar/browser/calendarView.pt 
instance at 407edc50>,
  'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object 
at 0x4190592c>}

     * Module zope.tales.expressions, line 207, in __call__
     * Module zope.tales.expressions, line 201, in _eval
     * Module Products.CMFCore.FSPythonScript, line 108, in __call__
     * Module Shared.DC.Scripts.Bindings, line 306, in __call__
     * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
     * Module Products.CMFCore.FSPythonScript, line 163, in _exec
     * Module None, line 9, in get_permalink
       <FSPythonScript at /cmf/get_permalink used for /cmf/cmf>
       Line 9

Unauthorized: You are not allowed to access 'isPrincipiaFolderish' in 
this context (Also, an error occurred while attempting to render the 
standard error message.)

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the z3-five mailing list