Notice
Recent Posts
Recent Comments
Link
목록Shell (1)
Seung's Learning Record
[Django] Shell 사용하기
목차Django의 shell은 Django 프레임워크에서 제공하는 인터랙티브한 콘솔 환경이다. 이 셸을 사용하면 Django 애플리케이션의 데이터베이스와 상호 작용할 수 있다. Django 셸을 통해 데이터를 읽고 쓰고 수정할 수 있으며, 데이터베이스 관련 작업을 테스트하거나 디버그할 때 유용하다.Django Shell 기초Shell 실행python manage.py shelltable에 있는 데이터 가져오기#models.py 파일에 정의된 모든 모델 가져오기>>> from polls.models import *>>> Question#모든 Question,Choice 오브젝트 가져오기>>> Question.objects.all()>>> Choice.objects.all()#첫번째 Choice 오브젝트 가..
Dev Tool/Django
2024. 4. 9. 00:16