Coverage for conf/settings/misc.py: 100%
9 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 06:14 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 06:14 +0000
1"""Settings very specific to Openverse, used inside the API app."""
3from decouple import config
6SHOW_COLLECTION_DOCS = config("SHOW_COLLECTION_DOCS", cast=bool, default=True)
8FILTER_DEAD_LINKS_BY_DEFAULT = config(
9 "FILTER_DEAD_LINKS_BY_DEFAULT", cast=bool, default=True
10)
12ENABLE_FILTERED_INDEX_QUERIES = config(
13 "ENABLE_FILTERED_INDEX_QUERIES", cast=bool, default=False
14)
16# Log full Elasticsearch response
17VERBOSE_ES_RESPONSE = config("DEBUG_SCORES", default=False, cast=bool)
19# Whether to boost results by authority and popularity
20USE_RANK_FEATURES = config("USE_RANK_FEATURES", default=True, cast=bool)
22# The scheme to use for the hyperlinks in the API responses
23API_LINK_SCHEME = config("API_LINK_SCHEME", default=None)
25# The version of the API. We follow the semantic version specification.
26API_VERSION = config("SEMANTIC_VERSION", default="Version not specified")
28OUTBOUND_USER_AGENT_TEMPLATE = config(
29 "OUTBOUND_USER_AGENT_TEMPLATE",
30 default=f"Openverse{{purpose}}/{API_VERSION} (https://wordpress.org/openverse)",
31)