Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Remove `django-storages` and associated conf (#3036)
Dhruv Bhanushali19e6e4b36ac1
diff --git a/api/Pipfile b/api/Pipfileindex 753a89574..dc9acc1e2 100644--- a/api/Pipfile+++ b/api/Pipfile@@ -27,7 +27,6 @@ django-cors-headers = "~=4.2"django-log-request-id = "~=2.0"django-oauth-toolkit = "~=2.3"django-redis = "~=5.3"-django-storages = "~=1.13"django-tqdm = "~=1.3"django-uuslug = "~=2.0"djangorestframework = "~=3.14"diff --git a/api/Pipfile.lock b/api/Pipfile.lockindex c17ebed89..53b5ce17e 100644--- a/api/Pipfile.lock+++ b/api/Pipfile.lock@@ -1,7 +1,7 @@{"_meta": {"hash": {- "sha256": "695fb28026f336e8706c5085bf0afb67566cb77da71894dbdf9b3565bdc75c27"+ "sha256": "8d540f91190d6b5df6afbed9da12a6914d68cdd183096d5d74a853a99ea96f66"},"pipfile-spec": 6,"requires": {@@ -107,6 +107,7 @@"sha256:fd1ed388ea7fbed22c4968dd64bab0198de60750a25fe8c0c9d4bef5abe13824"],"index": "pypi",+ "markers": "python_version >= '3.6'","version": "==3.8.5"},"aiosignal": {@@ -151,19 +152,20 @@},"boto3": {"hashes": [- "sha256:519639859a3c829ccf7073a58b3716cb26cb5906e306fe63eb4beab68bf9bfab",- "sha256:c9fad1b01a1d7e7bd51150b3175b4c32b79d699ce94708082611f59fde2e097a"+ "sha256:33062ab3801029ab7b2cb35b6bf4768715d13c5f9ea7d5dce22ace6219c1dc7a",+ "sha256:cda98a2952cccb1db4208c53a1bba6585620fffa0ca05244827ca65884856d1f"],"index": "pypi",- "version": "==1.28.49"+ "markers": "python_version >= '3.7'",+ "version": "==1.28.50"},"botocore": {"hashes": [- "sha256:7d64cb45154e4f34f3a45f551e118caad7379ae831565639e0afe5b2af126c61",- "sha256:95e9716f27f67d4207f260ab0ea157603ca544d3b82c5f21728b1c732bec1817"+ "sha256:5038a407783ea394aaf0671d1086cf55cc1e7c303e1fac244b76adc78cc7ef07",+ "sha256:a1343f2e38ea86e11247d61bd37a9d5656c16186f4a21b482c713589a054c605"],"markers": "python_version >= '3.7'",- "version": "==1.31.49"+ "version": "==1.31.50"},"certifi": {"hashes": [@@ -358,6 +360,7 @@"sha256:acdc1651a3e802415e0337b7e1192df5cd7c17b72fbab480466fdd799b9a72e7"],"index": "pypi",+ "markers": "python_version >= '3.7'","version": "==6.5.0"},"deprecated": {@@ -373,7 +376,7 @@"sha256:5e5c1c9548ffb7796b4a8a4782e9a2e5a3df3615259fc1bfd3ebc73b646146c1","sha256:b6b2b5cae821077f137dc4dade696a1c2aa292f892eca28fa8d7bfdf2608ddd4"],- "index": "pypi",+ "markers": "python_version >= '3.8'","version": "==4.2.5"},"django-cors-headers": {@@ -382,6 +385,7 @@"sha256:f9749c6410fe738278bc2b6ef17f05195bc7b251693c035752d8257026af024f"],"index": "pypi",+ "markers": "python_version >= '3.8'","version": "==4.2.0"},"django-log-request-id": {@@ -406,6 +410,7 @@"sha256:8bc5793ec06b28ea802aad85ec437e7646511d4e571e07ccad19cfed8b9ddd44"],"index": "pypi",+ "markers": "python_version >= '3.6'","version": "==5.3.0"},"django-split-settings": {@@ -414,21 +419,15 @@"sha256:4b3be146776d49c61bd9dcf89fad40edb1544f13ab27a87a0b1aecf5a0d636f4"],"index": "pypi",+ "markers": "python_version >= '3.7' and python_version < '4.0'","version": "==1.2.0"},- "django-storages": {- "hashes": [- "sha256:11280a883b13812df548f3cfe9c10280afc0d4727c8babdee369a75e71158f16",- "sha256:6c97e5faad829c923a1262206281742c484d76d43b332a196ddcc242b909c551"- ],- "index": "pypi",- "version": "==1.14"- },"django-tqdm": {"hashes": ["sha256:571a68d50050667d6b8e0c1f284542d372801a0ac3e3e9f817f1b854e043c3f4"],"index": "pypi",+ "markers": "python_version >= '3.7'","version": "==1.3.1"},"django-uuslug": {@@ -437,6 +436,7 @@"sha256:5029077e9682db81a9f847cec9dc33c07f2e455e31f98931869e6220ca65a3e9"],"index": "pypi",+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'","version": "==2.0.0"},"djangorestframework": {@@ -445,6 +445,7 @@"sha256:eb63f58c9f218e1a7d064d17a70751f528ed4e1d35547fdade9aaf4cd103fd08"],"index": "pypi",+ "markers": "python_version >= '3.6'","version": "==3.14.0"},"drf-spectacular": {@@ -453,6 +454,7 @@"sha256:afeccc6533dcdb4e78afbfcc49f3c5e9c369aeb62f965e4d1a43b165449c147a"],"index": "pypi",+ "markers": "python_version >= '3.6'","version": "==0.26.4"},"elastic-transport": {@@ -469,6 +471,7 @@"sha256:bffd6ce4faaacf90e6f617241773b3da8fb94e2e83554f5508e2fab92ca79643"],"index": "pypi",+ "markers": "python_version >= '3.6' and python_version < '4'","version": "==8.8.2"},"elasticsearch-dsl": {@@ -477,6 +480,7 @@"sha256:ab266bcf84b0f23bd2d73d9b31e054b5d38b20279cf076c53873f46b6dabf747"],"index": "pypi",+ "markers": "python_version >= '3.7'","version": "==8.9.0"},"frozenlist": {@@ -551,6 +555,7 @@"sha256:34a17436ed1e96697a86f9de3d15a3b0be01d8bc8de9c1dffd59fb8234ed5307"],"index": "pypi",+ "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'","version": "==0.18.3"},"gunicorn": {@@ -559,6 +564,7 @@"sha256:88ec8bff1d634f98e61b9f65bc4bf3cd918a90806c6f5c48bc5603849ec81033"],"index": "pypi",+ "markers": "python_version >= '3.5'","version": "==21.2.0"},"idna": {@@ -776,7 +782,7 @@"sha256:fcb59711009b0168d6ee0bd8fb5eb259c4ab1717b2f538bbf36bacf207ef7a68","sha256:fd2a5403a75b54661182b75ec6132437a181209b901446ee5724b589af8edef1"],- "index": "pypi",+ "markers": "python_version >= '3.8'","version": "==10.0.1"},"psycopg2": {@@ -794,6 +800,7 @@"sha256:f00cc35bd7119f1fed17b85bd1007855194dde2cbd8de01ab8ebb17487440ad8"],"index": "pypi",+ "markers": "python_version >= '3.6'","version": "==2.9.7"},"pycparser": {@@ -1321,6 +1328,7 @@"sha256:bc76d97d1a65bbd9842a6d722882098eb549ec8ee1081f9fb2e8ff29f0c300f1"],"index": "pypi",+ "markers": "python_version >= '3.7'","version": "==3.3.0"},"faker": {@@ -1337,6 +1345,7 @@"sha256:f9c18d3dba81a470953cc042868b411e334109e065cde53a7a82beef6702a1de"],"index": "pypi",+ "markers": "python_version >= '3.7' and python_version < '4.0'","version": "==2.18.0"},"freezegun": {@@ -1345,6 +1354,7 @@"sha256:ea1b963b993cb9ea195adbd893a48d573fda951b0da64f60883d7e988b606c9f"],"index": "pypi",+ "markers": "python_version >= '3.6'","version": "==1.2.2"},"furl": {@@ -1368,6 +1378,7 @@"sha256:45a2c3a529296870a97b7de34eda4a31bee16bc7bf954e07d39abe49caf8f887"],"index": "pypi",+ "markers": "python_version >= '3.9'","version": "==8.15.0"},"jedi": {@@ -1466,6 +1477,7 @@"sha256:cc448d95159fc0903d36182992778a096eda5752d660d47671383c8e2bf633f1"],"index": "pypi",+ "markers": "python_version >= '3.7'","version": "==3.5.0"},"pgspecial": {@@ -1534,6 +1546,7 @@"sha256:5d1013ba8dc7895b548be5afb05740ca82454fd899971563d2ef625d090326f8"],"index": "pypi",+ "markers": "python_version >= '3.8'","version": "==2.11.0"},"pygments": {@@ -1550,6 +1563,7 @@"sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069"],"index": "pypi",+ "markers": "python_version >= '3.7'","version": "==7.4.2"},"pytest-django": {@@ -1558,6 +1572,7 @@"sha256:d9076f759bb7c36939dbdd5ae6633c18edfc2902d1a69fdbefd2426b970ce6c2"],"index": "pypi",+ "markers": "python_version >= '3.5'","version": "==4.5.2"},"pytest-raises": {@@ -1614,6 +1629,7 @@"sha256:94f73a92ac1248cf16189211011f97096bdada8a7baac8c79372663bbb57b5d0"],"index": "pypi",+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'","version": "==2.1.0"},"rpds-py": {@@ -1856,11 +1872,11 @@},"typing-extensions": {"hashes": [- "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36",- "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"+ "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0",+ "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"],- "markers": "python_version >= '3.7'",- "version": "==4.7.1"+ "markers": "python_version >= '3.8'",+ "version": "==4.8.0"},"wcwidth": {"hashes": [diff --git a/api/conf/settings/__init__.py b/api/conf/settings/__init__.pyindex 3f854a265..d3bf19d2d 100644--- a/api/conf/settings/__init__.py+++ b/api/conf/settings/__init__.py@@ -37,7 +37,6 @@ include(# additional packages"oauth2.py","rest_framework.py",- "s3.py","sentry.py","spectacular.py","thumbnails.py",diff --git a/api/conf/settings/s3.py b/api/conf/settings/s3.pydeleted file mode 100644index bcbef2b3c..000000000--- a/api/conf/settings/s3.py+++ /dev/null@@ -1,19 +0,0 @@-from decouple import config--from conf.settings.base import INSTALLED_APPS, STORAGES---# S3 storage-# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings--USE_S3 = config("USE_S3", default=False, cast=bool)---if USE_S3:- if "storages" not in INSTALLED_APPS:- INSTALLED_APPS.append("storages")-- STORAGES["default"]["BACKEND"] = "storages.backends.s3boto3.S3Boto3Storage"-- AWS_STORAGE_BUCKET_NAME = config("LOGOS_BUCKET", default="openverse_api-logos-prod")- AWS_S3_SIGNATURE_VERSION = "s3v4"diff --git a/api/env.template b/api/env.templateindex c1ac59d10..1bf6201b5 100644--- a/api/env.template+++ b/api/env.template@@ -11,9 +11,6 @@ ALLOWED_HOSTS=localhost,172.17.0.1,host.docker.internal#LOAD_BALANCER_URL=-#USE_S3=False-#LOGOS_BUCKET=openverse-api-logos-prod-#DISABLE_GLOBAL_THROTTLING=True#REDIS_HOST=cache