简体   繁体   English

Django 1.2和南方问题

[英]Django 1.2 and south problem

I was using python 2.5 and django 1.0.2. 我使用的是python 2.5和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: 但我最近搬到了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'

After running migrate several times, it eventually passes. 在多次运行迁移后,它最终通过。 I have 5 different apps under migration and I thought it can be dependencies issue. 我有5个不同的应用程序迁移,我认为它可能是依赖问题。 But I have no migrations calling other apps. 但我没有调用其他应用程序的迁移。 So what can be the problem? 那可能是什么问题呢?

Regards, Arshavski Alexander. 此致,Arshavski Alexander。

Django 1.2 supports multiple DB's, and the version of South you are running does not. Django 1.2支持多个DB,而您运行的South版本则不支持。 Try checking out a more recent version - supposedly this was fixed at some point in 0.6 , and should work in 0.7. 尝试检查一个更新的版本 - 据说这是固定在0.6的某个点 ,并应该在0.7。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM