Skip to content

Commit

Permalink
Merge pull request #53 from fromedwin/develop
Browse files Browse the repository at this point in the history
Rollback to Django 4.2 and add back storage_backends
  • Loading branch information
sebastienbarbier authored Oct 14, 2024
2 parents d232896 + fa8e2d5 commit 9d0f7f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
# s3 static settings
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
STATIC_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/static/'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
DEFAULT_FILE_STORAGE = 'core.storage_backends.MediaStorage'
MEDIA_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/media/'

if not AWS_S3_CUSTOM_DOMAIN:
Expand Down
5 changes: 5 additions & 0 deletions src/core/storage_backends.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from storages.backends.s3boto3 import S3Boto3Storage

class MediaStorage(S3Boto3Storage):
location = 'media'
file_overwrite = False
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cron-descriptor==1.4.5
cryptography==43.0.1
defusedxml==0.7.1
dj-database-url==2.2.0
Django==5.1.2
Django==4.2
django-allauth==65.0.2
django-browser-reload==1.16.0
django-celery-beat==2.7.0
Expand Down

0 comments on commit 9d0f7f8

Please sign in to comment.