Replace the old CC `BASE_URL` of media reports
krysal opened this issue · 3 comments
Description
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.
openverse-api/api/catalog/api/models/media.py
Line 145 in 21405cc
And potentially and preferably we can centralize this constant in the settings.py
file for the example responses as well.
Reproduction
- Run
just up
to bring up the API - Pick any id from http://localhost:50280/v1/audio/ (or from the image list)
- Replace
<uuid>
with the id previously selected and create a media report with:
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/
- Go to http://localhost:50280/admin/api/audioreport/ The user & pass for the local API is
deploy
- See the wrong URL under the "Audio url" column.
Screenshots
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!