File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
3
3
from pyconkr .settings import *
4
+ from pyconkr .storage import *
4
5
5
6
DEBUG = True
6
7
22
23
23
24
# django-storages: S3
24
25
del MEDIA_ROOT
25
- DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
26
- STATICFILES_STORAGE = "storages.backends.s3boto3.S3StaticStorage"
26
+ # DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
27
+ # STATICFILES_STORAGE = "storages.backends.s3boto3.S3StaticStorage"
28
+
29
+ DEFAULT_FILE_STORAGE = MediaStorage
30
+ STATICFILES_STORAGE = StaticStorage
31
+
27
32
AWS_S3_ACCESS_KEY_ID = os .getenv ("AWS_S3_ACCESS_KEY_ID" )
28
33
AWS_S3_SECRET_ACCESS_KEY = os .getenv ("AWS_S3_SECRET_ACCESS_KEY" )
29
34
AWS_DEFAULT_REGION = "ap-northeast-2"
Original file line number Diff line number Diff line change
1
+ from django .conf import settings
2
+ from storages .backends .s3boto3 import S3Boto3Storage , S3StaticStorage
3
+
4
+
5
+ class MediaStorage (S3Boto3Storage ):
6
+ def _get_security_token (self ):
7
+ return None
8
+
9
+
10
+ class StaticStorage (S3StaticStorage ):
11
+ def _get_security_token (self ):
12
+ return None
You can’t perform that action at this time.
0 commit comments