File tree Expand file tree Collapse file tree 4 files changed +117
-2
lines changed Expand file tree Collapse file tree 4 files changed +117
-2
lines changed Original file line number Diff line number Diff line change 11POSTGRES_DB = oz06project
22POSTGRES_USER = oz06
33POSTGRES_PASSWORD = oz06pw123ㄴ
4+
5+
6+
7+ # 네이버 클라우드 객체 스토리지 버킷 정보
8+ NCP_BUCKET_NAME = 240429-bucket2
9+ NCP_ACCESS_KEY = YHoRoOdaeXpdpiALGJzE
10+ NCP_SECRET_KEY = zTMivNsQyIDQgdhRmIqdMZmCzGLocvBK0kkgKObI
11+ NCP_REGION_NAME = kr-standard
Original file line number Diff line number Diff line change 175175 }
176176}
177177
178+ # 네이버 클라우드 객체 스토리지 버킷 정보
179+ NCP_BUCKET_NAME = env ('NCP_BUCKET_NAME' )
180+ NCP_ACCESS_KEY = env ('NCP_ACCESS_KEY' )
181+ NCP_SECRET_KEY = env ('NCP_SECRET_KEY' )
182+ NCP_REGION_NAME = env ('NCP_REGION_NAME' )
183+
184+ # DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
185+ AWS_STORAGE_BUCKET_NAME = NCP_BUCKET_NAME
186+ AWS_ACCESS_KEY_ID = NCP_ACCESS_KEY
187+ AWS_SECRET_ACCESS_KEY = NCP_SECRET_KEY
188+ AWS_S3_REGION_NAME = NCP_REGION_NAME
189+ AWS_S3_CUSTOM_DOMAIN = f'https://kr.object.ncloudstorage.com/{ NCP_BUCKET_NAME } '
190+
191+
178192
179193# Password validation
180194# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
218232# BASE_DIR / 'static'
219233]
220234
221- MEDIA_URL = 'http://www.pette.me/media/'
235+ MEDIA_URL = 'https://kr.object.ncloudstorage.com/240429-bucket2/'
236+ # MEDIA_URL = 'https://kr.object.ncloudstorage.com/pette/'
237+ # MEDIA_URL = 'http://www.pette.me/media/'
222238# MEDIA_URL = 'media/'
223239MEDIA_ROOT = os .path .join (BASE_DIR , 'media' )
224240# Default primary key field type
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ sqlalchemy = "^2.0.29"
2424django-admin-thumbnails = " ^0.2.8"
2525drf-yasg = " ^1.21.7"
2626django-cors-headers = " ^4.3.1"
27+ django-storages = " ^1.14.2"
28+ boto3 = " ^1.34.93"
2729
2830
2931[build-system ]
You can’t perform that action at this time.
0 commit comments