South/Django 的问题:无法识别 Django 应用程序

发布于 2024-08-29 05:02:04 字数 560 浏览 5 评论 0原文

我的机器上有一个 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 md5

There 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

°如果伤别离去 2024-09-05 05:02:04

我是不是在做一些愚蠢的事情?

好吧,让我们从“是否已插入”问题开始:

  • 您的项目目录在您的 Python 路径中吗?
  • 您运行的是python manage.py,而不是python some/path/i/am/omitting/manage.py吗? (这是避免项目位于 Python 路径中的好方法。)
  • ./manage.pysyncdb 的输出是什么? (我使用 ./manage.py 而不是 python manage.py 以防万一它们引用不同的 python。)

Am I doing something really stupid?

Well, let's start with the "is it plugged in" questions:

  • Is your project directory in your Python path?
  • Are you running 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.)
  • What is the output of ./manage.py syncdb? (I use ./manage.py instead of python manage.py just in case they refer to different pythons.)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文