Exemple #1
0
  def getListData(self):
    idx = lists.getListIndex(self.request)
    if idx == 0:
      q = self._getQueryForTasks()

      starter = lists.keyStarter
      prefetcher = lists.listModelPrefetcher(
          GCITask, ['org'], ['mentors'])

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

      return response_builder.build()
    else:
      return None
    def getListData(self):
        """Returns the list data as requested by the current request.

    If the lists as requested is not supported by this component None is
    returned.
    """
        idx = lists.getListIndex(self.request)
        if idx == self.idx:
            list_query = project_logic.getProjectsQueryForEvalForOrgs(orgs=self.data.org_admin_for)

            starter = lists.keyStarter
            prefetcher = lists.listModelPrefetcher(GSoCProject, ["org"], ["mentors", "failed_evaluations"], parent=True)
            row_adder = evaluationRowAdder(self.evals)

            response_builder = lists.RawQueryContentResponseBuilder(
                self.request, self._list_config, list_query, starter, prefetcher=prefetcher, row_adder=row_adder
            )
            return response_builder.build()
        else:
            return None
Exemple #3
0
  def getListData(self):
    """Returns the list data as requested by the current request.

    If the lists as requested is not supported by this component None is
    returned.
    """
    idx = lists.getListIndex(self.request)
    if idx == 0:
      list_query = getAcceptedProjectsQuery(
          program=self.data.program, org=self.data.organization)

      starter = lists.keyStarter
      prefetcher = lists.listModelPrefetcher(
          GSoCProject, ['org'], ['mentors'], parent=True)

      response_builder = lists.RawQueryContentResponseBuilder(
          self.request, self._list_config, list_query,
          starter, prefetcher=prefetcher)
      return response_builder.build()
    else:
      return None
Exemple #4
0
    def getListData(self):
        """Returns the list data as requested by the current request.

    If the lists as requested is not supported by this component None is
    returned.
    """
        if lists.getListIndex(self.request) != 1:
            return None

        q = GCITask.all()
        q.filter("program", self.data.program)
        q.filter("org IN", self.data.mentor_for)

        starter = lists.keyStarter
        prefetcher = lists.listModelPrefetcher(GCITask, ["org", "student", "created_by", "modified_by"], ["mentors"])

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

        return response_builder.build()