python 学习2
2016-06-14 20:05
211 查看
在1的基础上
settings.py
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614200924917-968360931.png)
blog/models.py:
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201108260-2019709228.png)
打开一个cmd, net start mysql ,启动mysql服务
mysql -uroot -p
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201316245-1530545611.png)
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201509479-1268310436.png)
再在py_fir目录下打开另一个cmd窗口;
python 1.7及以上版本请运行 python manage.py makemigrations, python manage.py migrate
python 1.6及以下运行 python manage.py syncdb
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201751104-1783936900.png)
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614202614026-1800715816.png)
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614202657745-1411503099.png)
settings.py
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614200924917-968360931.png)
blog/models.py:
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201108260-2019709228.png)
打开一个cmd, net start mysql ,启动mysql服务
mysql -uroot -p
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201316245-1530545611.png)
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201509479-1268310436.png)
再在py_fir目录下打开另一个cmd窗口;
python 1.7及以上版本请运行 python manage.py makemigrations, python manage.py migrate
python 1.6及以下运行 python manage.py syncdb
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614201751104-1783936900.png)
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614202614026-1800715816.png)
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614202657745-1411503099.png)
![](https://images2015.cnblogs.com/blog/807157/201606/807157-20160614202705385-1467419910.png)
相关文章推荐
- Ubuntu环境下完美安装python模块numpy,scipy,matplotlib
- python scikit-learn计算tf-idf词语权重
- 219. Contains Duplicate II [easy] (Python)
- python的动态性以及 使用__slots__
- 用python做个翻译小软件吧~
- uuid in python
- Python基础(一)(基于Python2.7)
- python 学习1
- Eclipse Download and Installation (for Python) Instructions
- Python简介与入门(基于Python2.7)
- python非字符串与字符产链连接
- Python里有趣的列表解析和生成器表达式
- Python中的super使用
- python基础之坑爹正则表达式
- Python下json.loads()中文字符出错解决
- 使用python脚本备份crontab定时任务
- python位操作学习笔记
- Python入门简单的静态网页爬虫1.0 (爬虫架构 )
- python脚本之过滤关键字
- 笔记 python与json数据