Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(81)  |  Call(41)  |  Derive(0)  |  Import(40)

src/r/e/redomino.tabsandslides-0.9.11/redomino/tabsandslides/portlets/portlet_generic_talexp.py   redomino.tabsandslides(Download)
from plone.app.layout.navigation.defaultpage import isDefaultPage
 
from Products.CMFCore.Expression import Expression, getExprContext
 
from plone.app.form.widgets.wysiwygwidget import WYSIWYGWidget
        if self.data.talexp and self.data.talexp.strip() and context:
            expression = Expression(self.data.talexp)
            expression_context = getExprContext(context, object = context)
            expresult = expression(expression_context)
            if isinstance(expresult, LazyMap): # case 1: talexp returns brains

src/c/o/collective.listingviews-1.0beta3/src/collective/listingviews/browser/views/base.py   collective.listingviews(Download)
from zope.component import getMultiAdapter
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.Expression import Expression, getExprContext
from plone.uuid.interfaces import IUUID
from Products.Five import BrowserView
        def value(item):
            expression_context = getExprContext(self.context, self.context)
            expression_context.setLocal('item', item)
            val = expression(expression_context)
            return {'title': field.name, 'css_class': css_class, 'value': val, 'is_custom': True}

src/c/o/collective.listingviews-HEAD/src/collective/listingviews/browser/views/base.py   collective.listingviews(Download)
from zope.component import getMultiAdapter
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.Expression import Expression, getExprContext
from plone.uuid.interfaces import IUUID
from Products.Five import BrowserView
        def value(item):
            expression_context = getExprContext(self.context, self.context)
            expression_context.setLocal('item', item)
            val = expression(expression_context)
            return {'title': field.name, 'css_class': css_class, 'value': val, 'is_custom': True}

src/v/i/vice.plone.outbound-1.0rc1/vice/plone/outbound/portlets/feedlinks.py   vice.plone.outbound(Download)
from Products.CMFPlone import PloneMessageFactory as _
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.Expression import getExprContext, Expression
 
# Plone imports
    def _getObjects(self):
        obs = []
        for tal in self.data.tal_lines:
            expr = Expression(tal)
            econtext = getExprContext(self.context.aq_inner,

src/c/o/collective.easyform-1.0a1/collective/easyform/api.py   collective.easyform(Download)
# -*- coding: utf-8 -*-
from Products.CMFCore.Expression import Expression
from Products.CMFCore.Expression import getExprContext
from hashlib import md5
from plone.memoize import ram
    :returns: result of TALES expression
    """
    expression_context = getExprContext(context, context)
    for key in kwargs:
        expression_context.setGlobal(key, kwargs[key])

src/c/o/collective.bumblebee-1.0a3/collective/bumblebee/selectors.py   collective.bumblebee(Download)
from bumblebee.selectors import Base
from Products.CMFCore.Expression import Expression, getExprContext
from lxml.html import fromstring
from lxml.html import tostring
from lxml.html import HtmlElement
    def __call__(self, node, extras={}):
        context = extras.get('context')
        expr_context = getExprContext(context, context)
        try:
            result = fromstring(self.expression(expr_context))

src/c/o/collective.bumblebee-1.0a3/collective/bumblebee/conditions.py   collective.bumblebee(Download)
from bumblebee.conditions import BaseIf
from Products.CMFCore.Expression import Expression, getExprContext
 
 
class IfPath(BaseIf):
    def __call__(self, root, extras={}):
        context = extras.get('context')
        expr_context = getExprContext(context, context)
        try:
            return bool(self.expression(expr_context))

src/r/e/redomino.tabsandslides-0.9.11/redomino/tabsandslides/portlets/portlet_generic_folder.py   redomino.tabsandslides(Download)
from plone.i18n.normalizer.interfaces import IIDNormalizer
from Acquisition import aq_inner, aq_parent
from Products.CMFCore.Expression import Expression, getExprContext
 
from plone.portlets.interfaces import IPortletDataProvider
    def evaluate_exp(self, ctx, expression):
        expression_context = getExprContext(self, ctx)
        # works but It's not perfectly clear how
        # http://collective-docs.readthedocs.org/en/latest/functionality/expressions.html
        value = expression(expression_context)

src/t/o/tomcom.bootstrap.navbar-4.3.0.4/tomcom/bootstrap/navbar/browser/tcbnavbar/browser.py   tomcom.bootstrap.navbar(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
 
from tomcom.browser.public import *
from Products.CMFCore.Expression import Expression,getExprContext
            dict_['target']=item.getProperty('link_target','_self')
            dict_['class']=item.getProperty('class_','')
            dict_['url']=Expression(item.url_expr)(getExprContext(context,context))
 
        current.append(dict_)

src/p/r/Products.PloneFormGen-1.7.14/Products/PloneFormGen/content/form.py   Products.PloneFormGen(Download)
from Products.CMFCore.permissions import View, ModifyPortalContent
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.Expression import getExprContext
 
from Products.CMFPlone.utils import safe_hasattr
                # process the override enabled TALES expression
                # create a context for expression evaluation
                context = getExprContext(self, obj)
                # call the tales expression, passing our custom context
                enabled = obj.getFgTEnabled(expression_context=context)
 
                # create a context for expression evaluation
                context = getExprContext(self, obj)
 
                # put this field's input (from request)
                        # evaluate the execCondition.
                        # create a context for expression evaluation
                        context = getExprContext(self, actionAdapter)
                        doit = actionAdapter.getExecCondition(
                          expression_context=context)

  1 | 2 | 3 | 4 | 5  Next