반응형
![](https://blog.kakaocdn.net/dn/cvRiIX/btrsMByCr1F/UGSWKNE4wzCmyBcAWksxV1/img.png)
Writing your first Django app, part 2 | Django documentation | Django
Writing your first Django app, part 2 ¶ This tutorial begins where Tutorial 1 left off. We’ll set up the database, create your first model, and get a quick introduction to Django’s automatically-generated admin site. Where to get help: If you’re having trouble going through this tutorial, please hea...
docs.djangoproject.com
1. 기본 설치되는 sqlite3의 shell에 입장하기
$ python manage.py dbshell
2. 존재하는 table 확인하기
$ python manage.py dbshell
SQLite version 3.36.0 2021-06-18 18:58:49
Enter ".help" for usage hints.
sqlite> .tables
auth_group auth_user_user_permissions
auth_group_permissions django_admin_log
auth_permission django_content_type
auth_user django_migrations
auth_user_groups django_session
3. DB shell 빠져나오기
sqlite> .quit
4. DB Schema Migration 하기
$ python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
No migrations to apply.
반응형
'Django' 카테고리의 다른 글
Python Shell 이용하여 명령어 실행시키기 (0) | 2022.02.08 |
---|---|
Django Model 생성하기 (0) | 2022.02.08 |
Django에서 Static File 읽어오기 (0) | 2022.02.08 |
Shell을 이용하여 가상환경 바로 들어가기 (0) | 2022.02.08 |
Django Template을 이용한 html 호출 (0) | 2022.02.08 |