https://docs.djangoproject.com/en/1.8/intro/tutorial01/
1. get django version
python -c "import django; print(django.get_version())"
2. run server
python manage.py runserver
3. create a project
django-admin startproject [project name]
4. create a app
python manage.py startapp [app name]
5. create a migration file (not changing database, just create a file)
python manage.py makemigrations
6. apply migration (update database schema)
python manage.py migrate
时间: 2024-10-11 13:14:28