South/Django 的问题:无法识别 Django 应用程序
我的机器上有一个 Django 项目,当我尝试使用 South 迁移数据模式时,我遇到了一些奇怪的错误。例子:
$ python manage.py Convert_to_south thisLocator
/Library/Python/2.6/site-packages/registration/models.py:4:DeprecationWarning:sha > 模块已弃用;使用 hashlib 模块代替 进口沙 /Users/cm/code/thisLocator/../thisLocator/batches/models.py:6:DeprecationWarning:md5 > 模块已弃用;使用 hashlib 代替 导入md5
没有启用的应用程序与“thisLocator”匹配。
我已遵循 South 文档。 Settings.py 在已安装的应用程序中包含它,我可以从manage.py shell 运行 import South。我团队中的其他人都将该应用程序称为 thisLocator。
我真的在做一些愚蠢的事情吗?
I've got a Django project on my machine and when I try to use South to migrate the data schema, I get several odd errors. Example:
$ python manage.py convert_to_south thisLocator
/Library/Python/2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha >module is deprecated; use the hashlib module instead
import sha
/Users/cm/code/thisLocator/../thisLocator/batches/models.py:6: DeprecationWarning: the md5 >module is deprecated; use hashlib instead
import md5There is no enabled application matching 'thisLocator'.
I've followed the South documentation. Settings.py has it in the installed apps, I can run import south from the manage.py shell. Everyone else on my team is calling the app thisLocator.
Am I doing something really stupid?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,让我们从“是否已插入”问题开始:
python manage.py
,而不是python some/path/i/am/omitting/manage.py
吗? (这是避免项目位于 Python 路径中的好方法。)./manage.pysyncdb
的输出是什么? (我使用 ./manage.py 而不是 python manage.py 以防万一它们引用不同的 python。)Well, let's start with the "is it plugged in" questions:
python manage.py
and not, say,python some/path/i/am/omitting/manage.py
? (This is a great way to not have the project in the Python path.)./manage.py syncdb
? (I use ./manage.py instead ofpython manage.py
just in case they refer to different pythons.)