There is no South database module 'south.db.postgresql_psycopg2' for your database django

倾然丶 夕夏残阳落幕 提交于 2019-12-22 03:35:48

问题


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"
}

回答1:


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




回答2:


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

Just:

pip uninstall south

Then:

python manage.py runserver

And resolve import errors.




回答3:


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.




回答4:


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




回答5:


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.



来源:https://stackoverflow.com/questions/29647602/there-is-no-south-database-module-south-db-postgresql-psycopg2-for-your-databa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!