Using Django, South and Sqlite during development [closed]

断了今生、忘了曾经 提交于 2019-12-21 21:18:23

问题


I'm new to Python (2.7) and Django (1.5) and am working through the Django book whilst making a hobby site. I'm using Sqlite3 as dev db, but in production I intend to us MySQL. South looks like a great solution for database schema migration management, but it doesn't play well with Sqlite. I'm now tempted to install MySQL on my dev machine, but wonder if there's a way to avoid that. I'd appreciate knowing a simple, practical solution to this problem, if anyone knows of one.

Edit: I meant a programmatic solution (for those that feel this is off topic). I imagined there may be a way to use Django's settings.py and some custom code to accomplish this.


回答1:


No, there's no way around this. To use South properly you require complete ALTER TABLE support which SQLite does not have.

This and other small differences will make developing on MySQL a better choice, especially if you plan to deploy to MySQL.



来源:https://stackoverflow.com/questions/17973720/using-django-south-and-sqlite-during-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!