Django-firebird无法正常工作 [英] Django-firebird can not work
本文介绍了Django-firebird无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我下载了该文件夹并将其放入 C:\ Python27 \ Lib \ site-packages \ django \ contrib \ gis \ db \ backends \ firebird
,但是当我使用它时,给我一个
I downloaded the folder and put it into C:\Python27\Lib\site-packages\django\contrib\gis\db\backends\firebird
,but when I use it,give me a
error:django.core.exceptions.ImproperlyConfigured: 'firebird' isn't an available database backend.
Try using `django.db.backends.XXX, where XXX is one of:
'dummy', 'mysql', 'oracle', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named firebird.base
我已经将路径写入 PYTHONPATH
.
如何使它正常工作?
推荐答案
Use Django 1.3 (or higher) and follow the instructions on the django-firebird page.
Django 1.4在github上使用 django-firebird驱动程序
Django 1.4 uses the django-firebird driver on github
在您的 settings.py
文件中,使用与此类似的内容...
In your settings.py
file, use something similar to this...
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'testdb',
'USER': 'testdb_user',
'PASSWORD': 'testdbpassw',
'HOST': '',
'PORT': '',
},
'fb': {
'ENGINE': 'firebird',
'NAME': '/home/idle/mydb.gdb',
'USER': 'SYSDBA',
'PASSWORD': 'passw',
'HOST': '127.0.0.1',
'PORT': '3050',
'OPTIONS': {'charset':'WIN1251', 'dialect':1} ,
}
}
这篇关于Django-firebird无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文