python 学习2

1的基础上

settings.py

blog/models.py:

 

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

mysql -uroot -p

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

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

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

原文地址:https://www.cnblogs.com/hackers/p/5585309.html