개발일기

media & static 파일 다루기 / (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting 해결하기 본문

오늘의 공부일기/장고 공부일기

media & static 파일 다루기 / (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting 해결하기

츄98 2023. 5. 10. 22:14

https://darrengwon.tistory.com/355

 

업로드 다루기: Meida와 static의 차이, mark_safe

static과 media는 다릅니다. media는 파일을 업로드받은 뒤 해당 파일을 서빙하는 것이고 static은 소스 코드 내에 존재하는 파일을 서빙하는 것입니다. 아래 실습에서는 따로 S3와 같은 스토리지에 저

darrengwon.tistory.com

https://tibetsandfox.tistory.com/31

 

장고(Django) - media 파일 다루기

서론 장고에서의 media 파일은 ImageField와 FileField를 통해 저장하게 된 파일들을 의미합니다. 단순히 저 두가지 필드만을 통해 저장할 수 있는 것은 아니고 FileField를 상속받아 커스텀 필드를 만들

tibetsandfox.tistory.com

https://sayari3.com/articles/20-how-to-upload-media-files-with-django-and-javascript-fetch-api/

 

How to Upload Media Files With Django and Javascript Fetch API

We are going to learn how to upload media files using Django and JavaScript fetch API, in this tutorial I will be using an example Django app that I have re-used from the previous tutorial . SOURCE CODE USED IN THIS TUTORIAL You can clone it or download it

sayari3.com

 

위 블로그들의 내용을 참고하여 아래와 같이 해결하였다.

 

해결방법 :

'오늘의 공부일기 > 장고 공부일기' 카테고리의 다른 글

장고 모델 필드  (0) 2023.05.26
[MySQL] 설치 및 db 생성하기  (0) 2023.05.24
테스트코드 작성하기  (0) 2023.05.02
Django SECRET_KEY 관리하기  (0) 2023.04.29
장고심화  (0) 2023.04.25