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

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/p/t/ptahcrowd-0.2/ptahcrowd/populate.py   ptahcrowd(Download)
def create_admin_user(registry):
    crowd_cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, registry)
    if not crowd_cfg['admin-login']:
        return
 

src/p/t/ptahcrowd-HEAD/ptahcrowd/populate.py   ptahcrowd(Download)
def create_admin_user(registry):
    crowd_cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, registry)
    if not crowd_cfg['admin-login']:
        return
 

src/p/t/ptahcrowd-0.2/ptahcrowd/user.py   ptahcrowd(Download)
 
        # create user
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, self.request.registry)
        tp = cfg['type']
        if not tp.startswith('type:'):

src/p/t/ptahcrowd-HEAD/ptahcrowd/user.py   ptahcrowd(Download)
 
        # create user
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, self.request.registry)
        tp = cfg['type']
        if not tp.startswith('type:'):

src/p/t/ptahcrowd-0.2/ptahcrowd/forbidden.py   ptahcrowd(Download)
        self.__parent__ = context
 
        CFG = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, self.request.registry)
 
        user = ptah.auth_service.get_userid()

src/p/t/ptahcrowd-HEAD/ptahcrowd/forbidden.py   ptahcrowd(Download)
        self.__parent__ = context
 
        CFG = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, self.request.registry)
 
        user = ptah.auth_service.get_userid()

src/p/t/ptahcrowd-HEAD/ptahcrowd/tests/test_validation.py   ptahcrowd(Download)
        principal = Principal('1', 'user', 'user')
 
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD)
 
        # validation disabled
        CrowdUser.__type__.add(user)
 
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD)
        cfg['validation'] = True
        self.registry.notify(ptah.events.PrincipalRegisteredEvent(user))
        CrowdUser.__type__.add(user)
 
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD)
        cfg['validation'] = False
        self.registry.notify(ptah.events.PrincipalRegisteredEvent(user))

src/p/t/ptahcrowd-HEAD/ptahcrowd/tests/test_login.py   ptahcrowd(Download)
        request = self.make_request()
 
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD)
        cfg['join'] = False
        cfg['join-url'] = 'http://test/login.html'
        request.registry = self.registry
 
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, self.registry)
        cfg['join'] = True
        cfg['join-url'] = ''
        user.validated = False
 
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD)
        cfg['allow-unvalidated'] = False
 

src/p/t/ptahcrowd-HEAD/ptahcrowd/tests/test_join.py   ptahcrowd(Download)
    def test_join_disabled(self):
        import ptahcrowd
        from ptahcrowd.registration import Registration
 
        cfg = ptah.get_settings(ptahcrowd.CFG_ID_CROWD)
        MAIL['Mailer'] = Stub()
 
        CROWD = ptah.get_settings(ptahcrowd.CFG_ID_CROWD)
        CROWD['allow-unvalidated'] = False
 

src/p/t/ptahcrowd-HEAD/ptahcrowd/tests/test_forbidden.py   ptahcrowd(Download)
        request.root = Context()
 
        CFG = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, self.registry)
        CFG['login-url'] = '/custom-login.html'
 
        request.root = Context()
 
        CFG = ptah.get_settings(ptahcrowd.CFG_ID_CROWD, self.registry)
        CFG['login-url'] = 'http://login.example.com'
 

  1 | 2  Next