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

All Samples(16)  |  Call(8)  |  Derive(0)  |  Import(8)
Adapter interface for managing and storing invitations
    

src/f/t/ftw.participation-1.3.1/ftw/participation/quota.py   ftw.participation(Download)
from Products.Archetypes.atapi import IntegerField, IntegerWidget
from Products.CMFCore.permissions import ManagePortal
from ftw.participation.interfaces import IParticipationQuotaSupport
from ftw.participation.interfaces import IParticipationQuotaHelper
from ftw.participation.interfaces import IInvitationStorage
        allowed -= len(self.context.get_local_roles())
        # subtract the amount of pending invitations
        storage = IInvitationStorage(self.context)
        allowed -= len(storage.get_invitations_for_context(self.context))
        return allowed

src/f/t/ftw.participation-1.3.1/ftw/participation/browser/invitations.py   ftw.participation(Download)
from Products.statusmessages.interfaces import IStatusMessage
from ftw.participation import _
from ftw.participation.interfaces import IInvitationStorage
from zExceptions import Forbidden
import os.path
    def __call__(self):
        self.storage = IInvitationStorage(self.context)
        self.handle_pending_invitations()
        authenticator = self.context.restrictedTraverse('@@authenticator',
                                                        None)

src/f/t/ftw.participation-1.3.1/ftw/participation/browser/accept.py   ftw.participation(Download)
from email.mime.text import MIMEText
from ftw.participation import _
from ftw.participation.interfaces import IInvitationStorage
from ftw.participation.interfaces import IParticipationSetter
from zExceptions import Redirect
 
        """
        self.storage = IInvitationStorage(self.context)
        self.invitation = self.storage.get_invitation_by_iid(iid)
        self.target = self.invitation.get_target()

src/f/t/ftw.participation-1.3.1/ftw/participation/invitation.py   ftw.participation(Download)
from Products.CMFCore.utils import getToolByName
from ftw.participation.interfaces import IInvitation, IInvitationStorage
from persistent import Persistent
from plone.uuid.interfaces import IUUID
from zope.component.hooks import getSite
        """
        # get the storage
        storage = IInvitationStorage(target)
        # set the attributes
        self.email = email

src/f/t/ftw.participation-1.3.1/ftw/participation/browser/participants.py   ftw.participation(Download)
from AccessControl import getSecurityManager
from ftw.participation import _
from ftw.participation.interfaces import IInvitationStorage
from plone.app.workflow.interfaces import ISharingPageRole
from Products.CMFCore.utils import getToolByName
    def remove_invitations(self, iids):
        self.require_manage()
 
        storage = IInvitationStorage(self.context)
 
    def get_pending_invitations(self):
        portal = getToolByName(self.context, 'portal_url').getPortalObject()
        mtool = getToolByName(self.context, 'portal_membership')
        storage = IInvitationStorage(portal)
 

src/f/t/ftw.participation-1.3.1/ftw/participation/browser/retract.py   ftw.participation(Download)
from Products.CMFCore.utils import getToolByName
from Products.statusmessages.interfaces import IStatusMessage
from ftw.participation import _
from ftw.participation.browser.accept import AcceptInvitation
from ftw.participation.interfaces import IInvitationStorage
    def load(self, iid):
        """Loads storage, invitation, target, etc
        """
        self.storage = IInvitationStorage(self.context)
        self.invitation = self.storage.get_invitation_by_iid(iid)

src/f/t/ftw.participation-1.3.1/ftw/participation/storage.py   ftw.participation(Download)
from Products.CMFCore.utils import getToolByName
from datetime import datetime
from ftw.participation.interfaces import IInvitationStorage
from persistent.dict import PersistentDict
from persistent.list import PersistentList

src/f/t/ftw.participation-1.3.1/ftw/participation/tests/test_invite.py   ftw.participation(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.participation.interfaces import IInvitationStorage
from ftw.participation.interfaces import IParticipationRegistry
from ftw.participation.interfaces import IParticipationSupport
 
        self.layer['request'].SESSION = {}
        storage = IInvitationStorage(self.layer['portal'])
        return storage.get_invitations_for_email(email)