def get_context_data(self, **kwargs):
        context = super(ProjectsView, self).get_context_data(**kwargs)

        items = []
        for project in self.object_list:
            try:
                last_published_release = project.release_set.filter(
                    is_active=True).order_by("-release_date")[0]
            except __HOLE__:
                continue
            else:
                items.append({"project": project, 
                              "release": last_published_release})

        if len(items):
            items.sort(key=lambda item: item['release'].release_date, 
                       reverse=True)

        context['items'] = items
        return context
dataset/ETHPy150Open danirus/django-comments-xtd/django_comments_xtd/demos/multiple/projects/views.py/ProjectsView.get_context_data