Py学习  »  问与答

求大神解释django与sql的一个问题

慢慢热舞 • 8 年前 • 2706 次点击  

我用的是django1.9的版本 ,, 学习的时候看的文档上有sqlall和syndb等一些命令在1.9的版本上没有了,不清楚现在是用的什么命令来替代,求大神告知一下 谢谢~

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/1616
 
2706 次点击  
文章 [ 4 ]  |  最新文章 8 年前
慢慢热舞
Reply   •   1 楼
慢慢热舞    8 年前

@道非道 谢谢 问题解决了

道非道
Reply   •   2 楼
道非道    8 年前

@慢慢热舞 执行python manage.py makemigrations,然后执行python manage.py migrate就行了

慢慢热舞
Reply   •   3 楼
慢慢热舞    8 年前

@道非道 您说的是--run-syncdb吗 为什么我执行后出现 Operations to perform: Apply all migrations: (none) Running migrations: No migrations to apply. Your models have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them. 我在models中写入了语句的呀

道非道
Reply   •   4 楼
道非道    8 年前

migrate