Skip to content

Commit

Permalink
Bump django-storages.
Browse files Browse the repository at this point in the history
  • Loading branch information
vossisboss committed Oct 23, 2024
1 parent 7d5d477 commit 39afe5d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
17 changes: 9 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ django-manifest-loader = "~1.0.0"
django-pattern-library = "~1.2.0"
django-permissions-policy = "~4.22"
django-referrer-policy = "~1.0"
django-storages = { version ="~1.13", extras = ["boto3"] }
django-storages = { version ="~1.14", extras = ["s3"] }
markdown = "~3.7"
pygments = "~2.18"
requests = "~2.32.3"
Expand Down
4 changes: 2 additions & 2 deletions wagtailio/core/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from wagtail.documents.models import document_served
from wagtail.whitelist import allow_without_attributes

from storages.backends.s3boto3 import S3Boto3Storage
from storages.backends.s3 import S3Storage


@hooks.register("construct_whitelister_element_rules")
Expand Down Expand Up @@ -48,7 +48,7 @@ def serve_document_from_s3(document, request):
and potentially risking DoS attack and the server timing out.
"""
# Skip this hook if not using django-storages boto3 backend.
if not issubclass(get_storage_class(), S3Boto3Storage):
if not issubclass(get_storage_class(), S3Storage):
return

# Send document_served signal, same as Wagtail does.
Expand Down
2 changes: 1 addition & 1 deletion wagtailio/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
# S3 configuration

if "AWS_STORAGE_BUCKET_NAME" in env:
STORAGES["default"]["BACKEND"] = "storages.backends.s3boto3.S3Boto3Storage"
STORAGES["default"]["BACKEND"] = "storages.backends.s3.S3Storage"
AWS_STORAGE_BUCKET_NAME = env["AWS_STORAGE_BUCKET_NAME"]
AWS_S3_FILE_OVERWRITE = False

Expand Down

0 comments on commit 39afe5d

Please sign in to comment.