Logo Search packages:      
Sourcecode: zope-managableindex version File versions  Download package

def ManagableIndex::Evaluation::Eval::_evaluate (   self,
) [private]

evaluate our expression property in a context containing
*value*, *object*, 'index', 'catalog' and standard names.

Reimplemented in ManagableIndex::Evaluation::EvalAndCall.

Definition at line 32 of file Evaluation.py.

00032                                   :
    '''evaluate our expression property in a context containing
    *value*, *object*, 'index', 'catalog' and standard names.'''
    index= self._findIndex()
    catalog= index.aq_inner.aq_parent # ATT: do we need to go up an additional level?
    # work around bug in "aq_acquire" (has 'default' argument but ignores it)
    try: request= object.aq_acquire('REQUEST',default=None)
    except AttributeError: request= None
    try: container= object.aq_inner.aq_parent
    except AttributeError: container= None
    data= {
      'value' : value,
      'index' : index,
      'catalog' : catalog,
      'object' : object,
      'here' : object, # compatibility
      'container' : container,
      'nothing' : None,
      'root' : index.getPhysicalRoot(),
      #'request': object.aq_acquire('REQUEST',default=None),
      'request': request,
      'modules' : SecureModuleImporter,
      'user' : getSecurityManager().getUser(),
    context= getEngine().getContext(data)
    expr= self._getExpression()
    return expr(context)

  def _findIndex(self):

Generated by  Doxygen 1.6.0   Back to index