가상환경 프로그램 설치하기
https://docs.conda.io/en/latest/miniconda.html
터미널 열기
맥에서 brew 설치하기
https://brew.sh/index_ko
요기!를 참고해서, 가상환경 생성 / 활성화하기
mysql ( 데이터베이스 프로그램 )
brew install mysql
mysqlclient ( 데이터베이스 추가 프로그램 )
pip install mysqlclient
django ( 웹 서비스 라이브러리 )
pip install django
django-cors-headers ( 장고 추가 프로그램 )
pip install django-cors-headers
프로젝트 필요요소 기준 저장해두기
pip freeze > requirements.txt
저장된 필요요소 기준 자동설치하기
pip install -r requirements.txt
( 맨 밑에! )
##CORS
CORS_ORIGIN_ALLOW_ALL=True
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_METHODS = (
'DELETE',
'GET',
'OPTIONS',
'PATCH',
'POST',
'PUT',
)
CORS_ALLOW_HEADERS = (
'accept',
'accept-encoding',
'authorization',
'content-type',
'dnt',
'origin',
'user-agent',
'x-csrftoken',
'x-requested-with',
)