django-sphinx
django-sphinx copied to clipboard
/djangosphinx/utils/config.py uses a deprecated database config
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'].
Yes, i'm having this problem as well. djangosphinx needs to be udpated to work with django1.2
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.
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.
Hi. I written path http://paste.pocoo.org/show/263575/
In django new config as DATABASES[key]['ENGINE']
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 ! :)
Apkawa, good work!