feat!: upgrading django-storages to 1.11.1
This commit is contained in:
@@ -389,7 +389,7 @@ class S3Boto3TestCase(TestCase):
|
||||
@override_settings(VIDEO_IMAGE_SETTINGS={
|
||||
'STORAGE_CLASS': 'storages.backends.s3boto3.S3Boto3Storage',
|
||||
'STORAGE_KWARGS':
|
||||
{'bucket_name': 'test', 'default_acl': None, 'base_url': '/', 'location': 'abc/def'}}
|
||||
{'bucket_name': 'test', 'default_acl': None, 'location': 'abc/def'}}
|
||||
)
|
||||
def test_boto3_backend_with_params(self):
|
||||
storage = get_storage_class(
|
||||
@@ -417,7 +417,6 @@ class S3Boto3TestCase(TestCase):
|
||||
obj.upload_fileobj.assert_called_with(
|
||||
content,
|
||||
ExtraArgs={
|
||||
'ACL': 'public-read', # it will come from 1.9.1
|
||||
'ContentType': 'text/plain',
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2504,9 +2504,9 @@ VIDEO_IMAGE_SETTINGS = dict(
|
||||
# STORAGE_KWARGS=dict(bucket='video-image-bucket'),
|
||||
STORAGE_KWARGS=dict(
|
||||
location=MEDIA_ROOT,
|
||||
base_url=MEDIA_URL,
|
||||
),
|
||||
DIRECTORY_PREFIX='video-images/',
|
||||
BASE_URL=MEDIA_URL,
|
||||
)
|
||||
|
||||
VIDEO_IMAGE_MAX_AGE = 31536000
|
||||
@@ -2519,9 +2519,9 @@ VIDEO_TRANSCRIPTS_SETTINGS = dict(
|
||||
# STORAGE_KWARGS=dict(bucket='video-transcripts-bucket'),
|
||||
STORAGE_KWARGS=dict(
|
||||
location=MEDIA_ROOT,
|
||||
base_url=MEDIA_URL,
|
||||
),
|
||||
DIRECTORY_PREFIX='video-transcripts/',
|
||||
BASE_URL=MEDIA_URL,
|
||||
)
|
||||
|
||||
VIDEO_TRANSCRIPTS_MAX_AGE = 31536000
|
||||
|
||||
@@ -512,17 +512,17 @@ VIDEO_IMAGE_MAX_AGE: 31536000
|
||||
VIDEO_IMAGE_SETTINGS:
|
||||
DIRECTORY_PREFIX: video-images/
|
||||
STORAGE_KWARGS:
|
||||
base_url: /media/
|
||||
location: /edx/var/edxapp/media//
|
||||
VIDEO_IMAGE_MAX_BYTES: 2097152
|
||||
VIDEO_IMAGE_MIN_BYTES: 2048
|
||||
BASE_URL: /media/
|
||||
VIDEO_TRANSCRIPTS_MAX_AGE: 31536000
|
||||
VIDEO_TRANSCRIPTS_SETTINGS:
|
||||
DIRECTORY_PREFIX: video-transcripts/
|
||||
STORAGE_KWARGS:
|
||||
base_url: /media/
|
||||
location: /edx/var/edxapp/media//
|
||||
location: edx/var/edxapp/media//
|
||||
VIDEO_TRANSCRIPTS_MAX_BYTES: 3145728
|
||||
BASE_URL: /media/
|
||||
VIDEO_UPLOAD_PIPELINE:
|
||||
BUCKET: ''
|
||||
ROOT_PATH: ''
|
||||
|
||||
@@ -303,9 +303,9 @@ VIDEO_IMAGE_SETTINGS = dict(
|
||||
VIDEO_IMAGE_MIN_BYTES=2 * 1024, # 2 KB
|
||||
STORAGE_KWARGS=dict(
|
||||
location=MEDIA_ROOT,
|
||||
base_url=MEDIA_URL,
|
||||
),
|
||||
DIRECTORY_PREFIX='video-images/',
|
||||
BASE_URL=MEDIA_URL,
|
||||
)
|
||||
VIDEO_IMAGE_DEFAULT_FILENAME = 'default_video_image.png'
|
||||
|
||||
|
||||
@@ -280,12 +280,12 @@ if settings.DEBUG:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
urlpatterns += static(
|
||||
settings.VIDEO_IMAGE_SETTINGS['STORAGE_KWARGS']['base_url'],
|
||||
settings.VIDEO_IMAGE_SETTINGS['BASE_URL'],
|
||||
document_root=settings.VIDEO_IMAGE_SETTINGS['STORAGE_KWARGS']['location']
|
||||
)
|
||||
|
||||
urlpatterns += static(
|
||||
settings.VIDEO_TRANSCRIPTS_SETTINGS['STORAGE_KWARGS']['base_url'],
|
||||
settings.VIDEO_TRANSCRIPTS_SETTINGS['BASE_URL'],
|
||||
document_root=settings.VIDEO_TRANSCRIPTS_SETTINGS['STORAGE_KWARGS']['location']
|
||||
)
|
||||
|
||||
|
||||
@@ -3802,9 +3802,10 @@ VIDEO_IMAGE_SETTINGS = dict(
|
||||
# STORAGE_KWARGS=dict(bucket='video-image-bucket'),
|
||||
STORAGE_KWARGS=dict(
|
||||
location=MEDIA_ROOT,
|
||||
base_url=MEDIA_URL,
|
||||
),
|
||||
DIRECTORY_PREFIX='video-images/',
|
||||
BASE_URL=MEDIA_URL,
|
||||
|
||||
)
|
||||
|
||||
VIDEO_IMAGE_MAX_AGE = 31536000
|
||||
@@ -3818,9 +3819,9 @@ VIDEO_TRANSCRIPTS_SETTINGS = dict(
|
||||
# STORAGE_KWARGS=dict(bucket='video-transcripts-bucket'),
|
||||
STORAGE_KWARGS=dict(
|
||||
location=MEDIA_ROOT,
|
||||
base_url=MEDIA_URL,
|
||||
),
|
||||
DIRECTORY_PREFIX='video-transcripts/',
|
||||
BASE_URL=MEDIA_URL,
|
||||
)
|
||||
|
||||
VIDEO_TRANSCRIPTS_MAX_AGE = 31536000
|
||||
|
||||
@@ -614,17 +614,17 @@ VIDEO_IMAGE_MAX_AGE: 31536000
|
||||
VIDEO_IMAGE_SETTINGS:
|
||||
DIRECTORY_PREFIX: video-images/
|
||||
STORAGE_KWARGS:
|
||||
base_url: /media/
|
||||
location: /edx/var/edxapp/media//
|
||||
location: edx/var/edxapp/media//
|
||||
VIDEO_IMAGE_MAX_BYTES: 2097152
|
||||
VIDEO_IMAGE_MIN_BYTES: 2048
|
||||
BASE_URL: /media/
|
||||
VIDEO_TRANSCRIPTS_MAX_AGE: 31536000
|
||||
VIDEO_TRANSCRIPTS_SETTINGS:
|
||||
DIRECTORY_PREFIX: video-transcripts/
|
||||
STORAGE_KWARGS:
|
||||
base_url: /media/
|
||||
location: /edx/var/edxapp/media//
|
||||
location: edx/var/edxapp/media//
|
||||
VIDEO_TRANSCRIPTS_MAX_BYTES: 3145728
|
||||
BASE_URL: /media/
|
||||
VIDEO_UPLOAD_PIPELINE:
|
||||
BUCKET: ''
|
||||
ROOT_PATH: ''
|
||||
|
||||
@@ -20,9 +20,8 @@ celery>=5.2.2,<6.0.0
|
||||
# required for celery>=5.2.0;<5.3.0
|
||||
click>=8.0,<9.0
|
||||
|
||||
# django-storages version 1.9 drops support for boto storage backend.
|
||||
# 1.9 gives an error for details https://github.com/jschneier/django-storages/issues/831
|
||||
django-storages==1.9.1
|
||||
# django-storages version 1.11.1 is major version upgrade.
|
||||
django-storages==1.11.1
|
||||
|
||||
|
||||
# The team that owns this package will manually bump this package rather than having it pulled in automatically.
|
||||
|
||||
@@ -358,7 +358,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/kernel.in
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.9.1
|
||||
django-storages==1.11.1
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/kernel.in
|
||||
|
||||
@@ -571,7 +571,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/testing.txt
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.9.1
|
||||
django-storages==1.11.1
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/doc.txt
|
||||
|
||||
@@ -421,7 +421,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/base.txt
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.9.1
|
||||
django-storages==1.11.1
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/base.txt
|
||||
|
||||
@@ -453,7 +453,7 @@ django-statici18n==2.4.0
|
||||
# -r requirements/edx/base.txt
|
||||
# lti-consumer-xblock
|
||||
# xblock-drag-and-drop-v2
|
||||
django-storages==1.9.1
|
||||
django-storages==1.11.1
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
# -r requirements/edx/base.txt
|
||||
|
||||
Reference in New Issue
Block a user