天天看点

python 学习2

在1的基础上

settings.py

python 学习2

blog/models.py:

python 学习2

打开一个cmd, net start mysql ,启动mysql服务

mysql -uroot -p

python 学习2
python 学习2

再在py_fir目录下打开另一个cmd窗口;

python 1.7及以上版本请运行 python manage.py makemigrations, python manage.py migrate

python 1.6及以下运行 python manage.py syncdb

python 学习2
python 学习2
python 学习2
python 学习2