Database Seeding
- 초기 데이터 세트로 데이터베이스를 채우는 것
- 애플리케이션 초기 설정 시 초기 사용자 계정이나 더미 데이터와 같은 시드 데이터를 로드
데이터를 export하기
python manage.py dumpdata <app이름> --output data.json


- json으로 data를 dump하기 (indent 4형식으로 하기)
python manage.py dumpdata main --output data.json --indent 4


- dump된 JSON 파일을 Django DB에 넣어주기
python manage.py loaddata data.json


참고