Skip to content

Commit 6fea104

Browse files
committed
Use django-storages' manifest files class instead of the overriden class
1 parent 7d0ae63 commit 6fea104

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

readthedocs/settings/docker_compose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def show_debug_toolbar(request):
155155
# Storage backend for build languages
156156
RTD_BUILD_TOOLS_STORAGE = 'readthedocs.storage.s3_storage.S3BuildToolsStorage'
157157
# Storage for static files (those collected with `collectstatic`)
158-
STATICFILES_STORAGE = 'readthedocs.storage.s3_storage.S3StaticStorage'
158+
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3ManifestStaticStorage'
159159

160160
AWS_ACCESS_KEY_ID = 'admin'
161161
AWS_SECRET_ACCESS_KEY = 'password'

readthedocs/storage/s3_storage.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@
1919
from .mixins import OverrideHostnameMixin, S3PrivateBucketMixin
2020

2121

22-
class S3BuildMediaStorage(BuildMediaStorageMixin, OverrideHostnameMixin, S3Boto3Storage):
23-
24-
"""An AWS S3 Storage backend for build artifacts."""
25-
26-
bucket_name = getattr(settings, 'S3_MEDIA_STORAGE_BUCKET', None)
27-
override_hostname = getattr(settings, 'S3_MEDIA_STORAGE_OVERRIDE_HOSTNAME', None)
28-
29-
def __init__(self, *args, **kwargs):
30-
super().__init__(*args, **kwargs)
31-
32-
if not self.bucket_name:
33-
raise ImproperlyConfigured(
34-
'AWS S3 not configured correctly. '
35-
'Ensure S3_MEDIA_STORAGE_BUCKET is defined.',
36-
)
37-
38-
3922
class S3BuildCommandsStorage(S3PrivateBucketMixin, S3Boto3Storage):
4023

4124
"""An AWS S3 Storage backend for build commands."""

0 commit comments

Comments
 (0)