Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(8) | Call(6) | Derive(0) | Import(2)
src/f/t/ftw.publisher.example-1.0/ftw/publisher/example/browser/controller.py ftw.publisher.example(Download)
from Products.Five.browser import BrowserView from ftw.publisher.example.interfaces import IPublisherWorkflowController from ftw.publisher.example.utils import is_action_possible from zExceptions import Redirect from zope.interface import implements
def check_publish_allowed(self, state_change): if not is_action_possible(self.context, 'push', show_warnings=True, show_errors=True): raise Redirect(self.request.get('HTTP_REFERER')) else: return state_change def check_reject_allowed(self, state_change): if not is_action_possible(self.context, 'reject',
def check_retract_allowed(self, state_change): if not is_action_possible(self.context, 'retract', show_warnings=True, show_errors=True): raise Redirect(self.request.get('HTTP_REFERER')) else: return state_change def check_revise_allowed(self, state_change): if not is_action_possible(self.context, 'revise',
src/f/t/ftw.publisher.example-1.0/ftw/publisher/example/eventhandlers.py ftw.publisher.example(Download)
from ftw.publisher.example import config from ftw.publisher.example.utils import get_workflow_name from ftw.publisher.example.utils import is_temporary, is_action_possible from plone.app.linkintegrity.interfaces import ILinkIntegrityInfo
return if is_action_possible(obj, action): if action == 'push': obj.restrictedTraverse('publisher.publish')()