Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update django-storages options #71

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

* [Fix] Adjust options for django-storages 1.14.

## Version 1.3.0 (2023-12-22)

* [Enhancement] Support Tutor 17 and Open edX Quince.
Expand Down
4 changes: 2 additions & 2 deletions tutors3/patches/openedx-common-settings
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
VIDEO_IMAGE_SETTINGS["STORAGE_KWARGS"]["location"] = VIDEO_IMAGE_SETTINGS["STORAGE_KWARGS"]["location"].lstrip("/")
VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["location"] = VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["location"].lstrip("/")
GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"] = GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"].lstrip("/")
GRADES_DOWNLOAD["STORAGE_KWARGS"]["bucket"] = "{{ S3_GRADE_BUCKET }}"
GRADES_DOWNLOAD["STORAGE_KWARGS"] = {"location": GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"].lstrip("/")}
GRADES_DOWNLOAD["STORAGE_KWARGS"]["bucket_name"] = "{{ S3_GRADE_BUCKET }}"

ORA2_FILEUPLOAD_BACKEND = "s3"
FILE_UPLOAD_STORAGE_BUCKET_NAME = "{{ S3_FILE_UPLOAD_BUCKET }}"
Expand Down
5 changes: 1 addition & 4 deletions tutors3/patches/openedx-lms-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
PROFILE_IMAGE_BACKEND = {
"class": DEFAULT_FILE_STORAGE,
"options": {
"bucket": "{{ S3_PROFILE_IMAGE_BUCKET }}",
"bucket_name": "{{ S3_PROFILE_IMAGE_BUCKET }}",
"location": PROFILE_IMAGE_BACKEND["options"]["location"].lstrip("/"),
{% if S3_PROFILE_IMAGE_CUSTOM_DOMAIN %}"custom_domain": "{{ S3_PROFILE_IMAGE_CUSTOM_DOMAIN }}",{% endif %}
# A non empty base_url is necessary in development as it will be used
# to build a static url for the profile images.
"base_url": "dummyprofileimagebaseurl",
},
}
{% endif %}
Loading