Django 1.2和南方问题

时间:2010-03-14 08:39:40

标签: django django-south

我使用的是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'

多次运行迁移后,它最终通过。 我有5个不同的应用程序迁移,我认为它可能是依赖问题。但我没有调用其他应用程序的迁移。 那可能是什么问题?

此致,Arshavski Alexander。

1 个答案:

答案 0 :(得分:4)

Django 1.2支持多个DB,而您运行的South版本则不支持。尝试检查一个更新的版本 - 据说这是fixed at some point in 0.6,并且应该在0.7。