【问题标题】:Django 1.2 and south problemDjango 1.2 和南方问题
【发布时间】:2010-03-14 08:39:39
【问题描述】:

我使用的是 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 个不同的应用程序正在迁移,我认为这可能是依赖关系问题。但我没有调用其他应用程序的迁移。 那么可能是什么问题呢?

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

【问题讨论】:

    标签: django django-south


    【解决方案1】:

    Django 1.2 支持多个数据库,而您运行的 South 版本不支持。尝试查看更新的版本 - 据说这是 fixed at some point in 0.6,应该可以在 0.7 中使用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-30
      • 1970-01-01
      • 2011-03-11
      • 1970-01-01
      • 1970-01-01
      • 2011-11-25
      • 2015-02-13
      • 1970-01-01
      相关资源
      最近更新 更多