Repository: WordPress/openverse-api

Issue:
Replace the old CC `BASE_URL` of media reports
## Description
<!-- Concisely describe the bug. Compare your experience with what you expected to happen. -->
<!-- For example: "I clicked the 'submit' button and instead of seeing a thank you message, I saw a blank page." -->
Currently, the media reports appear in the Django Admin with a URL from Creative Commons, meaning that when you click on the link it will count as a referrer from the old CC Search site, which is not true. The `BASE_URL` should be `https://wordpress.org/openverse/`.

This can be fixed by editing the following line.

https://github.com/WordPress/openverse-api/blob/21405cc4a4ea2f8dca41559d9e5e29763b188e86/api/catalog/api/models/media.py#L145

And potentially and preferably we can centralize this constant in the `settings.py` file for the example responses as well.

https://github.com/WordPress/openverse-api/blob/21405cc4a4ea2f8dca41559d9e5e29763b188e86/api/catalog/api/examples/audio_responses.py#L4

https://github.com/WordPress/openverse-api/blob/21405cc4a4ea2f8dca41559d9e5e29763b188e86/api/catalog/api/examples/image_responses.py#L4

## Reproduction
<!-- Provide detailed steps to reproduce the bug. -->
1. Run `just up` to bring up the API
2. Pick any id from http://localhost:50280/v1/audio/ (or from the image list)
3. Replace `<uuid>` with the id previously selected and create a media report with:
```sh
curl -X POST \
	-H 'Content-Type: application/json' \
	-d '{
		"mediaType":"audio",
		"identifier":"<uuid>",
		"reason":"other",
		"description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse blandit id felis sed imperdiet. Integer tristique nisi et metus sollicitudin."
	}'\
	http://localhost:50280/v1/audio/<uuid>/report/
```
4. Go to http://localhost:50280/admin/api/audioreport/ The user & pass for the local API is `deploy`
5. See the wrong URL under the "Audio url" column.

## Screenshots
<!-- Add screenshots to show the problem; or delete the section entirely. -->

![CleanShot 2022-10-03 at 12 41 28@2x](https://user-images.githubusercontent.com/9145885/193637806-7791a22f-86c0-4004-a51a-84252075c43d.png)



<!-- 
## Additional context
Add any other context about the problem here; or delete the section entirely. -->



Discussion:
Hi @krysal BASE_URL should be replaced by which URL? Clicking on the BASE_URL appears as a referrer `https://wordpress.org/openverse/?referrer=creativecommons.org` here.
Is it `https://wordpress.org/openverse/`?

@swapnalshahil That's correct! Sorry I forgot to mention the new URL, https://wordpress.org/openverse/ is indeed the new home of Openverse 😄 Do you want to try to solve this issue? I can assign it to you. 
@krysal Yes!

Resolving patch:
diff --git a/api/catalog/api/models/media.py b/api/catalog/api/models/media.py
--- a/api/catalog/api/models/media.py
+++ b/api/catalog/api/models/media.py
@@ -142,7 +142,7 @@ class AbstractMediaReport(models.Model):
     deleted_class: type[models.Model] = None
     """the class storing deleted media e.g. ``DeletedImage`` or ``DeletedAudio``"""
 
-    BASE_URL = "https://search.creativecommons.org/"
+    BASE_URL = settings.BASE_URL
 
     REPORT_CHOICES = [(MATURE, MATURE), (DMCA, DMCA), (OTHER, OTHER)]
 
diff --git a/api/catalog/settings.py b/api/catalog/settings.py
--- a/api/catalog/settings.py
+++ b/api/catalog/settings.py
@@ -376,3 +376,5 @@
 MAX_ANONYMOUS_PAGE_SIZE = 20
 MAX_AUTHED_PAGE_SIZE = 500
 MAX_PAGINATION_DEPTH = 20
+
+BASE_URL = config("BASE_URL", default="https://wordpress.org/openverse/")


Test patch: