14

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.

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:

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.

Serjik
  • 10,543
  • 8
  • 61
  • 70
ferprez
  • 143
  • 1
  • 1
  • 6

5 Answers5

70

Try pip uninstall South, then you will see if your application is 1.8 ready.

jammon
  • 3,404
  • 3
  • 20
  • 29
Papa Sax
  • 919
  • 2
  • 8
  • 10
  • 8
    This should be the correct answer. Forced downgrade to 1.6 isn't appropriate in the least bit. Unless you have other reasons to stay on 1.6. – JL Peyret Jul 08 '15 at 00:26
  • 6
    Very interesting: just having South installed (even with South application disabled) was what caused this issue for me when upgrading to Django 1.8. It should be the accepted answer indeed. – Ad N Jul 20 '15 at 18:15
10

Please note that South is now end of lifed in favour of the ​new migrations framework in Django 1.7, which is based on South but with significant design improvements.

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

South will not work with Django 1.7; It supports only versions 1.4, 1.5 and 1.6.

Niraj Chapla
  • 2,149
  • 1
  • 21
  • 34
WangST
  • 168
  • 1
  • 7
  • **South will not work with Django 1.7; It supports only versions 1.4, 1.5 and 1.6.** In that case why does Ubuntu 16.04 have a `python-django-south` package when the only available django version is 1.8? – kasperd Aug 28 '16 at 01:13
9

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").

kravietz
  • 10,667
  • 2
  • 35
  • 27
  • `pip install -U Django==1.7` – vmassuchetto Apr 12 '15 at 11:56
  • This will install exactly version 1.7 and I want latest version in the 1.6 line, thus `Django<1.7`. – kravietz Apr 13 '15 at 07:23
  • True, sorry. 1.6, though... =) – vmassuchetto Apr 13 '15 at 08:48
  • Didn't work for me in first place, you have to use `pip install 'Django<1.7'`. https://pip.pypa.io/en/stable/reference/pip_install.html#requirement-specifiers – vmassuchetto Apr 13 '15 at 08:56
  • You perhaps don't want exactly version 1.6 either - the latest one in 1.6 series is now 1.6.11 so you'd be missing all the bug and security fixes. So the `<1.7` syntax seems to do right what we want and you're probably right that the `-U` option might not always work. Actually, after a bit of reading I think that the **right** way to do this is to 1) uninstall old Django with pip, 2) remove the old Django directory in site-packages, 3) install the new Django. – kravietz Apr 14 '15 at 10:52
  • 2
    Surround the package and specifier with quotes so the < doesn't get interpreted by the shell: `pip install "Django<1.7"`. – Seth May 09 '15 at 16:45
  • 3
    That's like treating the symptom and leaving the root cause. – keni Jun 05 '15 at 07:21
  • 2
    Check out Papa Sax's answer. Worked like a charm. I was on Django 1.7.1, pip decided to bring 1.8 along when I updated django_tables2 and South was fully removed from all the settings. I already had flushed out all the South migrations when moving to 1.7. And I was still getting this mess on manage.py runserver. **pip uninstall South** saved the day! – JL Peyret Jul 08 '15 at 00:25
  • Why just someone provide a solution for Django 1.8! – HXH Aug 14 '15 at 00:11
7

But the point is how to fix the issue keeping django 1.8 (latest version). I do not think down grading to 1.6 is a good idea because django 1.6 is not a secure version anymore.

Lahiru
  • 679
  • 1
  • 6
  • 19
0

Using django 2.2.4 I realized that "south" was being included in one of my third party installed apps (socket_server). But not on the module, rather, in the migration policies (maybe the guys who created the module are still using an old version of django). So, changed the name from 0001_inicial.py to 0001_inicial_old and django was not able to find it and generated another. worked as half-measure (socket should install without it)

Rafael
  • 11
  • 1