您的数据库没有南数据库模块'south.db.postgresql_psycopg2' [英] There is no South database module 'south.db.postgresql_psycopg2' for your database
问题描述
我刚刚到django,我从南方得到这个错误,但我不知道我错过了什么。我搜索答案,但我找不到任何东西。
i new to django and I'm getting this error from south but i don't know what i'm missing. I search for answers but i can't found anything.
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.
这是我的base_settings:
This is my base_settings:
from unipath import Path
BASE_DIR = Path(__file__).ancestor(3)
SECRET_KEY = 'pp@iz7%bc7%+*11%usf7o@_e&)r2o&^3%zjse)n=6b&w^hem96'
DJANGO_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)
THIRD_PARTY_APPS = (
'south',
)
LOCAL_APPS = (
)
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
ROOT_URLCONF = 'misite.urls'
WSGI_APPLICATION = 'misite.wsgi.application'
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
local_settings:
local_settings:
from .base import *
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
DEBUG = True
DEFAULT_FROM_EMAIL = 'webmaster@example.com'
# ----------------------------
# POSTGRESQL
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'misite',
'USER:': 'fernandoperez',
'PASSWORD': 'admin',
'HOST':'localhost',
'PORT':'5432',
}
}
SOUTH_DATABASE_ADAPTERS = {
'default': "south.db.postgresql_psycopg2"
}
STATIC_URL = '/static/'
有人能帮我吗?感谢很多。
Can someone help me?? Thanks a lot.
推荐答案
当我使用 pip
其中一个依赖关系自动将Django升级到当前版本(1.8)。您可能只是检查您当前的Django版本( pip freeze
),如果它是1.8,只是降级到1.6行( pip install -UDjango< 1.7
)。
This happened to me when I upgraded various modules using pip
and one of the dependencies automatically upgraded Django to the current version (1.8). You might just check what is your current Django version (pip freeze
) and if it's 1.8 just downgrade to 1.6 line (pip install -U "Django<1.7"
).
这篇关于您的数据库没有南数据库模块'south.db.postgresql_psycopg2'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!