def init_with_context(self, context): self.children = [] request = context['request'] for slug, report in reporting.user_reports(request): self.children.append({ 'title': report.verbose_name, 'url': reverse('reporting-view', kwargs={'slug': slug}), 'external': False, })
def get_reports(self): report_classes = reporting.user_reports(self.request) reports = [] for slug, klass in report_classes: reports.append(( slug, klass(self.request), )) return reports
def get_reports(self): report_classes = reporting.user_reports(self.request) reports = [] for slug, klass in report_classes: reports.append((slug, klass(self.request),)) return reports