File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
22
33from pyconkr .settings import *
4+ from pyconkr .storage import *
45
56DEBUG = True
67
2223
2324# django-storages: S3
2425del 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+
2732AWS_S3_ACCESS_KEY_ID = os .getenv ("AWS_S3_ACCESS_KEY_ID" )
2833AWS_S3_SECRET_ACCESS_KEY = os .getenv ("AWS_S3_SECRET_ACCESS_KEY" )
2934AWS_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