gpt4 book ai didi

python - 您的数据库没有 South 数据库模块 'south.db.postgresql_psycopg2'

转载 作者:太空狗 更新时间:2023-10-29 17:08:56 30 4
gpt4 key购买 nike

我是 django 的新手,我从南方收到这个错误,但我不知道我错过了什么。我在寻找答案,但找不到任何东西。

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.

这是我的基本设置:

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

本地设置:

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/'

有人可以帮帮我吗??非常感谢。

最佳答案

尝试 pip uninstall South,然后您将看到您的应用程序是否已准备好 1.8。

关于python - 您的数据库没有 South 数据库模块 'south.db.postgresql_psycopg2',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29478400/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com