django-admin 常用命令

  • 创建项目:django-admin startproject
  • 在项目内创建新的 app:django-admin startapp

manage.py 常用命令

  • make database migration: python manage.py makemigrations
  • show sql: python manage.py sqlmigrate
  • database migrate: python manage.py migrate
  • shell: python manage.py shell
  • 创建管理员用户:python manage.py createsuperuser