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

All Samples(11)  |  Call(6)  |  Derive(0)  |  Import(5)

src/p/r/Products.sampleremember-1.1b2/Products/sampleremember/setuphandlers.py   Products.sampleremember(Download)
from Products.remember.utils import getAdderUtility
from config import DEFAULT_MEMBER_TYPE
 
def setupNewDefaultMember(context):
    """ Setup preferred default_member_type """
    portal = context.getSite()
    addr = getAdderUtility(portal)

src/p/r/Products.sampleremember-1.1b2/Products/sampleremember/tests/test_sampleremember.py   Products.sampleremember(Download)
from base import makeContent, addMember
 
from Products.remember.utils import getAdderUtility
 
from Products.membrane.interfaces import IMembraneUser
    def testSetupNewDefaultMember(self):
        """ Did we set the proper default user? """
        addr = getAdderUtility(self.portal)
        self.failUnless(addr.default_member_type == DEFAULT_MEMBER_TYPE)
 

src/p/r/Products.remember-1.9.3/Products/remember/browser/configlet.py   Products.remember(Download)
    from zope.formlib.form import PageForm
 
from Products.remember.utils import getAdderUtility
 
 
    def action_submit(self, action, data):
        adder = getAdderUtility(self.context)
        adder.default_member_type = data['default_mem_type']
 
    def getDefaultMemType(self):
        adder = getAdderUtility(self.context)

src/p/r/Products.remember-1.9.3/Products/remember/Extensions/toolbox.py   Products.remember(Download)
from App.class_init import InitializeClass
 
from Products.CMFCore.utils import getToolByName
 
from Products.remember.utils import getAdderUtility
        self.setWorkflow()
        if self.is_default:
            adder = getAdderUtility(self.context)
            adder.default_member_type = self.type
 

src/r/e/RemOpenID-0.9/topp/remopenid/plugin.py   RemOpenID(Download)
from Acquisition import aq_inner
from BTrees.OOBTree import OOBTree
from Products.CMFCore.utils import getToolByName
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.remember.utils import getAdderUtility
        # the adder utility b/c the utility loses the REQUEST from the
        # acq chain somehow, things go boom... :(
        adder = getAdderUtility(self)
        memtype = adder.default_member_type
        # temporarily escalate privs