def get_context_data(self, **kwargs): c = super(FrontPageView, self).get_context_data(**kwargs) programs = {} for node in Node.objects.filter(on_frontpage=True): programs[node] = Program.objects.filter( program__in=node.descendents(including_this=True), )[:10] c.update({ 'news': News.objects.all()[:13], 'programs': programs, 'orphaned_media': get_orphaned_media()[:10], 'happenings': Happening.objects.future()[:10], 'widgets': Widget.objects.all(), 'feeds': Feed.objects.filter(where=PANEL), 'links': Link.objects.all(), }) return c
def get_context_data(self, **kwargs): c = super(OrphanedMediaList, self).get_context_data(**kwargs) c['object_list'] = get_orphaned_media() return c