1.創建project django-admin.py startproject myblog 2.創建app python manage.py startapp blog 3. 創建資料庫表 或 更改資料庫表或欄位 Python manage.py makemigrations blog Pyth ...
1.創建project
django-admin.py startproject myblog
2.創建app
python manage.py startapp blog
3. 創建資料庫表 或 更改資料庫表或欄位
Python manage.py makemigrations blog
Python manage.py migrate
4. 運行開發伺服器
python manage.py runserver
5. 清空資料庫
python manage.py flush
6. 創建超級管理員
python manage.py createsuperuser
7. 導出/導入數據
python manage.py dumpdata appname > appname.json
python manage.py loaddata appname.json