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

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

src/a/c/actionbar.babble-0.3b3/src/actionbar/babble/browser/chat.py   actionbar.babble(Download)
 
        elif chat_id == 'actionbar_babble_chat_rooms':
            chatrooms = utils.get_chat_rooms(self.context)  
            template = ViewPageTemplateFile('templates/chatrooms.pt')
            return template(self, chatrooms=chatrooms, chat_id=chat_id, box_id=box_id)

src/b/a/babble.client-2.0/src/babble/client/portlets/chatrooms.py   babble.client(Download)
    def get_chat_rooms(self):
        return utils.get_chat_rooms(self.context)
 
    def get_id(self):
        """ """

src/b/a/babble.client-2.0/src/babble/client/tests/test_index.py   babble.client(Download)
                            )
 
        rooms = utils.get_chat_rooms(portal)
        self.assertEquals(len(rooms), 3)
 
 
        # This user doesn't have local roles so should not get the rooms
        rooms = utils.get_chat_rooms(portal)
        self.assertEquals(len(rooms), 0)
 
        self.login(name='user2')
 
        rooms = utils.get_chat_rooms(portal)
        self.assertEquals(len(rooms), 0)
 
        # Check that they do if a local role is added.
        chatroom = portal['chatroom-1']
        chatroom.manage_addLocalRoles('user2', ('Reader',))
        chatroom.reindexObject()
        rooms = utils.get_chat_rooms(portal)