Пример #1
0
def getSlotTransferEntitiesForOrg(org_entity, limit=1000):
  """Returns the slot transfer entity for the organization.

  params:
    org_entity: the Organization for which the slot transfer entity must be
        fetched

  returns:
    The slot transfer entity for the given organization
  """

  q = GSoCSlotTransfer.all().ancestor(org_entity)
  return q.fetch(limit=limit)
Пример #2
0
  def getListData(self):
    idx = lists.getListIndex(self.request)
    if idx != 0:
      return None

    q = GSoCSlotTransfer.all().filter('program', self.data.program)

    starter = lists.keyStarter
    prefetcher = lists.modelPrefetcher(GSoCSlotTransfer, [], parent=True)

    response_builder = lists.RawQueryContentResponseBuilder(
        self.request, self._list_config, q, starter, prefetcher=prefetcher)

    return response_builder.build()
Пример #3
0
    def getListData(self):
        idx = lists.getListIndex(self.data.request)
        if idx != 0:
            return None

        q = GSoCSlotTransfer.all().filter('program', self.data.program)

        starter = lists.keyStarter
        # TODO(daniel): enable prefetching ['parent']
        # prefetcher = lists.ModelPrefetcher(GSoCSlotTransfer, [], parent=True)

        response_builder = lists.RawQueryContentResponseBuilder(
            self.data.request, self._list_config, q, starter, prefetcher=None)

        return response_builder.build()