Django 1.2 和南方问题

发布于 2024-08-25 14:30:00 字数 2195 浏览 6 评论 0原文

我使用的是 python 2.5 和 django 1.0.2。但我最近迁移到 python 2.6 和 django 1.2,现在在迁移过程中出现以下错误:

alex@alex-desktop:~/server/mx30$ python manage.py migrate
Running migrations for peer_center:
 - Migrating forwards to 0005_adding_config_model.
 > peer_center: 0001_initial
 > peer_center: 0002_add_cache
 > peer_center: 0003_add_options_field
 > peer_center: 0004_add_player_option_to_media_item
 > peer_center: 0005_adding_config_model
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.6/dist-packages/south/management/commands/migrate.py", line 91, in handle
    skip = skip,
  File "/usr/local/lib/python2.6/dist-packages/south/migration.py", line 586, in migrate_app
    db.send_pending_create_signals()
  File "/usr/local/lib/python2.6/dist-packages/south/db/generic.py", line 678, in send_pending_create_signals
    self.really_send_create_signal(app_label, list(set(model_names)))
  File "/usr/local/lib/python2.6/dist-packages/south/db/generic.py", line 718, in really_send_create_signal
    verbosity=verbosity, interactive=interactive)
  File "/usr/local/lib/python2.6/dist-packages/django/dispatch/dispatcher.py", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python2.6/dist-packages/django/contrib/contenttypes/management.py", line 10, in update_contenttypes
    db = kwargs['db']
KeyError: 'db'

运行 migrate 几次后,它最终通过了。 我有 5 个不同的应用程序正在迁移,我认为这可能是依赖项问题。但我没有调用其他应用程序的迁移。 那么问题出在哪里呢?

问候,阿尔沙夫斯基·亚历山大。

I was using python 2.5 and django 1.0.2. But I moved to python 2.6 and django 1.2 recently and I'm getting the following error now during the migrate:

alex@alex-desktop:~/server/mx30$ python manage.py migrate
Running migrations for peer_center:
 - Migrating forwards to 0005_adding_config_model.
 > peer_center: 0001_initial
 > peer_center: 0002_add_cache
 > peer_center: 0003_add_options_field
 > peer_center: 0004_add_player_option_to_media_item
 > peer_center: 0005_adding_config_model
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.6/dist-packages/south/management/commands/migrate.py", line 91, in handle
    skip = skip,
  File "/usr/local/lib/python2.6/dist-packages/south/migration.py", line 586, in migrate_app
    db.send_pending_create_signals()
  File "/usr/local/lib/python2.6/dist-packages/south/db/generic.py", line 678, in send_pending_create_signals
    self.really_send_create_signal(app_label, list(set(model_names)))
  File "/usr/local/lib/python2.6/dist-packages/south/db/generic.py", line 718, in really_send_create_signal
    verbosity=verbosity, interactive=interactive)
  File "/usr/local/lib/python2.6/dist-packages/django/dispatch/dispatcher.py", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python2.6/dist-packages/django/contrib/contenttypes/management.py", line 10, in update_contenttypes
    db = kwargs['db']
KeyError: 'db'

After running migrate several times, it eventually passes.
I have 5 different apps under migration and I thought it can be dependencies issue. But I have no migrations calling other apps.
So what can be the problem?

Regards, Arshavski Alexander.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

顾冷 2024-09-01 14:30:00

Django 1.2 支持多个数据库,而您运行的 South 版本则不支持。尝试查看更新的版本 - 据说这是在 0.6 的某个时刻修复,并且应该在 0.7 中工作。

Django 1.2 supports multiple DB's, and the version of South you are running does not. Try checking out a more recent version - supposedly this was fixed at some point in 0.6, and should work in 0.7.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文