コード例 #1
0
def oral_argument_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_AUDIO_URL,
        make_sitemap_solr_params('dateArgued asc', 'oa_sitemap'),
        'monthly',
        ['mp3'],
        'absolute_url',
    )
コード例 #2
0
ファイル: sitemap.py プロジェクト: OCTO8888/LITIGAIT
def people_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_PEOPLE_URL,
        make_sitemap_solr_params("dob asc,name_reverse asc", "p_sitemap"),
        "monthly",
        [],
        "absolute_url",
    )
コード例 #3
0
ファイル: sitemap.py プロジェクト: umeboshi2/courtlistener
def opinion_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_OPINION_URL,
        make_sitemap_solr_params('dateFiled asc', 'o_sitemap'),
        'monthly',
        ['pdf', 'doc', 'wpd'],
        'absolute_url',
    )
コード例 #4
0
def people_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_PEOPLE_URL,
        make_sitemap_solr_params('dob asc,name_reverse asc', 'p_sitemap'),
        'monthly',
        [],
        'absolute_url',
    )
コード例 #5
0
ファイル: sitemap.py プロジェクト: umeboshi2/courtlistener
def recap_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_RECAP_URL,
        make_sitemap_solr_params('docket_id asc', 'r_sitemap'),
        'weekly',
        [],
        'docket_absolute_url',
    )
コード例 #6
0
ファイル: sitemap.py プロジェクト: samaramas/courtlistener
def opinion_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_OPINION_URL,
        make_sitemap_solr_params("dateFiled asc", "o_sitemap"),
        "monthly",
        ["pdf", "doc", "wpd"],
        "absolute_url",
    )
コード例 #7
0
ファイル: sitemap.py プロジェクト: samaramas/courtlistener
def recap_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_RECAP_URL,
        make_sitemap_solr_params("docket_id asc", "r_sitemap"),
        "weekly",
        [],
        "docket_absolute_url",
    )
コード例 #8
0
ファイル: sitemap.py プロジェクト: OCTO8888/LITIGAIT
def oral_argument_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_AUDIO_URL,
        make_sitemap_solr_params("dateArgued asc", "oa_sitemap"),
        "monthly",
        ["mp3"],
        "absolute_url",
    )
コード例 #9
0
def oral_argument_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_AUDIO_URL,
        make_sitemap_solr_params('dateArgued asc',
                                 'oa_sitemap'),
        'monthly',
        ['mp3'],
        'absolute_url',
    )
コード例 #10
0
ファイル: sitemap.py プロジェクト: snorey/courtlistener
def people_sitemap_maker(request):
    return make_solr_sitemap(
        request,
        settings.SOLR_PEOPLE_URL,
        make_sitemap_solr_params('dob asc,name_reverse asc',
                                 'p_sitemap'),
        'monthly',
        [],
        'absolute_url',
    )
コード例 #11
0
ファイル: tests.py プロジェクト: voutilad/courtlistener
    def get_expected_item_count(self):
        # OpinionsSitemap uses the solr index to generate the page, so the only
        # accurate count comes from the index itself which will also be based on
        # the fixtures.
        conn = sunburnt.SolrInterface(settings.SOLR_OPINION_URL, mode='r')
        params = make_sitemap_solr_params('dateFiled asc', 'o_sitemap')
        params['rows'] = 1000

        r = conn.raw_query(**params).execute()

        # the underlying SitemapTest relies on counting url elements in the xml
        # response...this logic mimics the creation of the xml, so we at least
        # know what we *should* get getting for a count if the SiteMapTest's
        # HTTP client-based test gets an HTTP 200
        count = 0
        for result in r:
            if result.get('local_path'):
                count += 2
            else:
                count += 1
        return count
コード例 #12
0
ファイル: tests.py プロジェクト: snorey/courtlistener
    def get_expected_item_count(self):
        # OpinionsSitemap uses the solr index to generate the page, so the only
        # accurate count comes from the index itself which will also be based on
        # the fixtures.
        conn = sunburnt.SolrInterface(settings.SOLR_OPINION_URL, mode='r')
        params = make_sitemap_solr_params('dateFiled asc', 'o_sitemap')
        params['rows'] = 1000

        r = conn.raw_query(**params).execute()

        # the underlying SitemapTest relies on counting url elements in the xml
        # response...this logic mimics the creation of the xml, so we at least
        # know what we *should* get getting for a count if the SiteMapTest's
        # HTTP client-based test gets an HTTP 200
        count = 0
        for result in r:
            if result.get('local_path'):
                count += 2
            else:
                count += 1
        return count
コード例 #13
0
    def get_expected_item_count(self):
        # OpinionsSitemap uses the solr index to generate the page, so the only
        # accurate count comes from the index itself which will also be based
        # on the fixtures.
        conn = ExtraSolrInterface(settings.SOLR_OPINION_URL)
        params = make_sitemap_solr_params("dateFiled asc", "o_sitemap")
        params["rows"] = items_per_sitemap
        params["fq"] = ["court_exact:%s" % self.court_id]

        r = conn.query().add_extra(**params).execute()

        # the underlying SitemapTest relies on counting url elements in the xml
        # response...this logic mimics the creation of the xml, so we at least
        # know what we *should* get getting for a count if the SiteMapTest's
        # HTTP client-based test gets an HTTP 200
        count = 0
        for result in r:
            if result.get("local_path"):
                count += 2
            else:
                count += 1
        return count