django小结
- 初始化项目
python manage.py runserver
python manage.py runserver 127.0.0.1:8080
python manage.py startapp polls
-
编辑视图 Views
-
编辑urls
urls.py -
数据库
python manage.py migrate
-model
python manage.py makemigrations polls
python manage,py sqlmigrate polls 0001
Change your models (in models.py).
Run python manage.py makemigrations to create migrations for those changes
Run python manage.py migrate to apply those changes to the database.