장고 프로젝트 준비쓰

춤추는망고·2020년 4월 18일
0

이 글은 아직 수정하기 전이에요!

가상환경 프로그램 설치하기
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

프로젝트의 settings 파일에 ' django-cors-headers 설정 ' 추가하기

( 맨 밑에! )

##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',
)
profile
지금까지 이런 망고는 없었다. 이것은 개발자인가 춤추는망고인가

0개의 댓글