コード例 #1
0
ファイル: search.py プロジェクト: sylvestre/indico
    def _getAnswer(self):
        results = {}
        users = search.searchUsers(
            surName=self._params.get("surName", ""),
            name=self._params.get("name", ""),
            organisation=self._params.get("organisation", ""),
            email=self._params.get("email", ""),
            conferenceId=self._params.get("conferenceId", None),
            exactMatch=self._params.get("exactMatch", False),
            searchExt=self._params.get("searchExt", False))

        groups = search.searchGroups(group=self._params.get("group", ""),
                                     searchExt=self._params.get(
                                         "searchExt", False))

        fossilizedUsers = [human.fossilize(IAvatarFossil) for human in users]
        fossilizedGroups = [group.fossilize(IGroupFossil) for group in groups]

        fossilizedUsers.sort(cmp=UserComparator.cmpUsers)
        fossilizedGroups.sort(cmp=UserComparator.cmpGroups)

        results["people"] = fossilizedUsers
        results["groups"] = fossilizedGroups

        return results
コード例 #2
0
ファイル: search.py プロジェクト: aninhalacerda/indico
    def _getAnswer(self):

        results = search.searchGroups(self._group, self._searchExt)

        fossilizedResults = fossilize(results, IGroupFossil)
        fossilizedResults.sort(cmp=UserComparator.cmpGroups)

        for fossilizedGroup in fossilizedResults:
            fossilizedGroup["isGroup"] = True

        return fossilizedResults
コード例 #3
0
ファイル: search.py プロジェクト: sylvestre/indico
    def _getAnswer(self):

        results = search.searchGroups(self._group, self._searchExt)

        fossilizedResults = fossilize(results, IGroupFossil)
        fossilizedResults.sort(cmp=UserComparator.cmpGroups)

        for fossilizedGroup in fossilizedResults:
            fossilizedGroup["isGroup"] = True

        return fossilizedResults
コード例 #4
0
ファイル: search.py プロジェクト: aninhalacerda/indico
    def _getAnswer(self):
        results = {}
        users = search.searchUsers(surName = self._params.get("surName", ""),
                               name = self._params.get("name", ""),
                               organisation = self._params.get("organisation", ""),
                               email = self._params.get("email", ""),
                               conferenceId = self._params.get("conferenceId", None),
                               exactMatch = self._params.get("exactMatch", False),
                               searchExt = self._params.get("searchExt", False))

        groups = search.searchGroups(group = self._params.get("group", ""),
                               searchExt = self._params.get("searchExt", False))

        fossilizedUsers = [human.fossilize(IAvatarFossil) for human in users]
        fossilizedGroups = [group.fossilize(IGroupFossil) for group in groups]

        fossilizedUsers.sort(cmp=UserComparator.cmpUsers)
        fossilizedGroups.sort(cmp=UserComparator.cmpGroups)

        results["people"] = fossilizedUsers
        results["groups"] = fossilizedGroups

        return results