There is no South database module 'south.db.po

2019-04-19 07:52发布

I have a django app with version as 1.6.5, i am trying to upgrade it to 1.8, but on the way i got the below error right after the django version was increased to 1.8

There is no South database module 'south.db.postgresql_psycopg2' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS.

Code

INSTALLED_APPS = [
   'django_messages',
    'avatar',
    'tinymce',
    'south',
    'tracking',
    ......
  ]

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'HOST': '127.0.0.1',
        'NAME': 'xxxxxx',
        'USER': 'xxxxxx',
        'PASSWORD': 'xxxxxx',
        },
    }

So what was the problem and what need to be done to fix this ?

I have even tried with the below setting and receiving the same error when running the django local server

SOUTH_DATABASE_ADAPTERS = {
    'default': "south.db. postgresql_psycopg2"
}

5条回答
对你真心纯属浪费
2楼-- · 2019-04-19 08:14

The solution i found to the above problem was just removing the south from virtual environment apart from all the changes mentioned above

查看更多
在下西门庆
3楼-- · 2019-04-19 08:19

Django with version >= 1.7 use built-in migration. You don't need to use south.

For more details about Django migration framework you can refer release note - https://docs.djangoproject.com/en/1.9/releases/1.7/#schema-migrations

Django docs - https://docs.djangoproject.com/en/1.8/topics/migrations/

Upgading from South - https://docs.djangoproject.com/en/1.8/topics/migrations/#upgrading-from-south

查看更多
4楼-- · 2019-04-19 08:29

If you are using Django < 1.7, you should also install South >= 1.0.1 if you haven’t already. This is not listed as a dependency for the sake of users who are on Django >= 1.7 and don’t need it.

查看更多
男人必须洒脱
5楼-- · 2019-04-19 08:32

You are probably still referencing to South with an import somewhere.

Just:

pip uninstall south

Then:

python manage.py runserver

And resolve import errors.

查看更多
我只想做你的唯一
6楼-- · 2019-04-19 08:34

Since Django 1.7, migrations are part of the framework. Instead of using South, you probably want to migrate to django.db.migrations.

Generally speaking, you should always read release notes (for 1.7 and 1.8) when doing such an update.

查看更多
登录 后发表回答