django-sphinx icon indicating copy to clipboard operation
django-sphinx copied to clipboard

/djangosphinx/utils/config.py uses a deprecated database config

Open mlissner opened this issue 15 years ago • 8 comments

See http://docs.djangoproject.com/en/dev/ref/settings/#deprecated-settings for details.

The code currently references settings.DATABASE_ENGINE, which has been replaced (I believe) with settings.DATABASES['default']['ENGINE'].

mlissner avatar Apr 05 '10 04:04 mlissner

Yes, i'm having this problem as well. djangosphinx needs to be udpated to work with django1.2

Apreche avatar May 28 '10 22:05 Apreche

Yeah, the only problem is that django-sphinx is looking for the old settings and django1.2 looks for the new settings. I did a workaround by putting this in my settings file.

DATABASE_ENGINE = 'mysql' DATABASE_NAME = DATABASES['default']['NAME'] DATABASE_USER = DATABASES['default']['USER'] DATABASE_PASSWORD = DATABASES['default']['PASSWORD'] DATABASE_HOST = DATABASES['default']['HOST'] DATABASE_PORT = DATABASES['default']['PORT']

The only problem is that the database engine setting is actually different, so you can't just point it at the new setting.

It would be easy to patch django-sphinx to just look at the new settings, but I don't think that's a good patch. Instead, to be really compatible with django 1.2 there has to be some multi-db support.

Apreche avatar Jun 03 '10 12:06 Apreche

Completely agree, and in fact, my solution was to edit the variables that django-sphinx looks for rather than add more variables to my settings files in django.

Until this simple bug is fixed, django-sphinx is increasingly looking like a worse and worse solution.

mlissner avatar Jun 14 '10 18:06 mlissner

Hi. I written path http://paste.pocoo.org/show/263575/

In django new config as DATABASES[key]['ENGINE']

Apkawa avatar Sep 18 '10 14:09 Apkawa

I edited my "settings.py" file .

DATABASE_ENGINE = 'mysql'
DATABASE_NAME = '<database name>'
DATABASE_USER = '<username>'
DATABASE_PASSWORD = '<password>'
DATABASE_HOST = '<leave blank for default>'
DATABASE_PORT = '<leave blank for default>'

It works ! :)

hibernatedguy avatar Jul 28 '11 14:07 hibernatedguy

Apkawa, good work!

adw0rd avatar Aug 10 '11 13:08 adw0rd