wire frame
온라인 집 예약 서비스를 만들어보자
django-admin starproject NATIVE
apt install tree
apt install python3-venv : 가상환경 설치
python3 -m venv : 명령어 확인
이제 각 프로젝트 별로 자기가 원하는 패키지를 설치하자
python3 -m venv .가상환경이름
tree -d -L 2 .가상환경이름
source .venv/bin/activate : 가상환경 실행
python3 --version : 가상환경 버전 확인
장고 설치
pip install django : 이걸 통해서 장고를 가상환경에 설치
tree .venv | grep django : 장고 구조
python3 -m django --version : 장고 버전확인
python manage.py 0.0.0.0:8000
깃 허브 설치
git init
vi .gitignore
https://github.com/github/gitignore/blob/master/Python.gitignore
공개키 설치
cd /etc/ssh
ssh-keygen -t ed25519 -C "ourclub7279@gmail.com"
뒤에 pub 달리거 사용하기
git add .
git commit -am "NEW"
기본설정
vi NATIVE/settings.py
vi settings.py 파일에 가서 ALLOWED_HOSTS = ["*"] 로 변경
가장 아래쪽에 이거 작성
STATICFILES_DIRS = [
BASE_DIR / "static",
'/var/www/static/',
]
python3 manage.py migrate : db 생성
python3 manage.py makemigrations : db 등록
앱등록
requirements 설치방법
pip install -r requirements
https://www.erdcloud.com/d/dBSfwRgHToBfQg3f4
http://www.databaseanswers.org/data_models/travel_agencies/index.htm
우선 협업자 등록
git fetch
git status
git pull origin main
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04
https://github.com/nomadcoders/airbnb-clone
로그인 분석