Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(34) | Call(17) | Derive(0) | Import(17)
src/p/l/plone.app.upgrade-1.3.6/plone/app/upgrade/v30/alphas.py plone.app.upgrade(Download)
from Products.CMFCalendar.interfaces import ICalendarTool from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.CMFCore.interfaces import IActionsTool from Products.CMFCore.interfaces import ICachingPolicyManager
new_category = getattr(aq_base(portal.portal_actions), category, None) if new_category is None: portal.portal_actions._setObject(category, ActionCategory(id=category)) new_category = portal.portal_actions[category]
src/p/l/plone.app.upgrade-HEAD/plone/app/upgrade/v30/alphas.py plone.app.upgrade(Download)
from Products.CMFCalendar.interfaces import ICalendarTool from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.CMFCore.interfaces import IActionsTool from Products.CMFCore.interfaces import ICachingPolicyManager
new_category = getattr(aq_base(portal.portal_actions), category, None) if new_category is None: portal.portal_actions._setObject(category, ActionCategory(id=category)) new_category = portal.portal_actions[category]
src/q/u/quintagroup.plonetabs-1.0/quintagroup/plonetabs/browser/plonetabs.py quintagroup.plonetabs(Download)
from Products.CMFCore.utils import getToolByName from Products.CMFCore.interfaces import IAction, IActionCategory from Products.CMFCore.ActionInformation import Action, ActionCategory from Products.CMFCore.Expression import Expression from Products.CMFPlone import utils
# create dummy category to avoid id # duplication during action update category = ActionCategory(cat_name) else: # get or create (if necessary) actions category
filter(lambda x: IActionCategory.providedBy(x), portal_actions.objectValues())): portal_actions._setObject(name, ActionCategory(name)) return self.getActionCategory(name)
src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/browser/actions.py Products.CMFCore(Download)
from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.GenericSetup.browser.utils import AddWithPresettingsViewBase from Products.GenericSetup.interfaces import INode
src/c/y/cyn.in-HEAD/src/ubify.policy/ubify/policy/migration/onetimeinstall.py cyn.in(Download)
from ubify.policy.config import * from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.CMFCore.Expression import Expression from Products.CMFNotification.NotificationTool import ID as NTOOL_ID
src/c/y/cyn.in-HEAD/src/ubify.policy/ubify/policy/setuphandlers.py cyn.in(Download)
from config import * from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.CMFCore.Expression import Expression from Products.CMFNotification.NotificationTool import ID as NTOOL_ID
src/p/l/plone.app.upgrade-1.3.6/plone/app/upgrade/v30/tests.py plone.app.upgrade(Download)
from Products.CMFCalendar.interfaces import ICalendarTool from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolInterface
if object_tabs is None: category = 'object_tabs' self.actions._setObject(category, ActionCategory(id=category)) object_tabs = self.actions.object_tabs if getattr(self.actions, 'global', None) is None: category = 'global' self.actions._setObject(category, ActionCategory(id=category))
src/p/l/plone.app.upgrade-HEAD/plone/app/upgrade/v30/tests.py plone.app.upgrade(Download)
from Products.CMFCalendar.interfaces import ICalendarTool from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolInterface
if object_tabs is None: category = 'object_tabs' self.actions._setObject(category, ActionCategory(id=category)) object_tabs = self.actions.object_tabs if getattr(self.actions, 'global', None) is None: category = 'global' self.actions._setObject(category, ActionCategory(id=category))
src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/exportimport/tests/test_actions.py Products.CMFCore(Download)
def setUp(self): from Products.CMFCore.ActionInformation import ActionCategory self._obj = ActionCategory('foo_category') self._XML = _ACTIONCATEGORY_XML
def _populate(self, obj): from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory obj._setObject('foo_category', ActionCategory('foo_category'))
src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/tests/test_ActionsTool.py Products.CMFCore(Download)
from Products.CMFCore.ActionInformation import Action from Products.CMFCore.ActionInformation import ActionCategory from Products.CMFCore.ActionInformation import ActionInformation from Products.CMFCore.Expression import Expression
def test_getActionObject_skips_newstyle_actions(self): tool = self._makeOne() tool._setObject('object', ActionCategory('object')) tool.object._setObject('newstyle_id', Action('newstyle_id')) rval = tool.getActionObject('object/newstyle_id') self.assertEqual(rval, None) def test_getActionObject_nonesuch_returns_None(self): tool = self._makeOne() tool._setObject('object', ActionCategory('object'))
1 | 2 Next