@@ -0,0 +1,956 @@
+from __future__ import absolute_import, print_function%0A%0Afrom django.conf import settings%0Afrom dimagi.utils.couch.cache import cache_core%0Afrom corehq.apps.reports.models import ReportConfig%0A%0Afrom django.core.management import BaseCommand%0A%0A%0Aclass Command(BaseCommand):%0A    def add_arguments(self, parser):%0A        parser.add_argument('report_slug')%0A%0A    def handle(self, report_slug, *args, **options):%0A        kwargs = %7B'stale': settings.COUCH_STALE_QUERY%7D%0A        key = %5B%22name slug%22%5D%0A        result = cache_core.cached_view(%0A            ReportConfig.get_db(),%0A            %22reportconfig/configs_by_domain%22,%0A            reduce=False, include_docs=False,%0A            startkey=key, endkey=key + %5B%7B%7D%5D,%0A            **kwargs)%0A        for report_config in result:%0A            domain, owner_id, slug = report_config%5B'key'%5D%5B1:4%5D%0A            if slug == report_slug:%0A                print(%22%25s, %25s, %25s%22 %25 (%0A                    domain, owner_id, slug%0A                ))%0A

Add command to find saved reports with slug[skip ci]