Django
- 파이썬 기반의 무료 오픈소스 웹 애플리케이션 프레임워크(Open Source Web Application Framework)
Django 구조(MVT패턴)
- URLConf - client가 요청한 url을 분석
- View - 데이터를 적절하게 원하는 형태로 만들어서 보여줌
- Model - 안전하게 데이터를 저장, 데이터 관리
- Template - 사용자의 입력과 이벤트에 반응하여 model과 view를 업데이트
Django 설정
pip install django
django-admin startproject (프로젝트이름)
python manage.py runserver
* startapp - 앱생성
* runserver - 서버실행
* createsuperuser - 관리자생성
* migrate - 변경사항을 DB에 반영
* shell - 쉘을 통해 데이터를 확인
* collectstatic - static 파일을 한 곳에 모음
python manage.py createsuperuser
username :
Email address :
password :