python - 无法使用 Django 连接到 firebird 数据库
问题描述
第一次使用 Django,所以我查找了一个教程 - 我点击了这个链接,一切都很好,直到我不得不调整 settings.py 文件,我点击了这个其他链接并得到了这个错误:
django.core.exceptions.ImproperlyConfigured: 'firebird' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
我通过 安装了 django-firebird pip install django-firebird
,我有一个不同的 python 脚本,它使用import fdb
得很好,并且我已经能够使用其他python 脚本定期访问我的 firebird 数据库,那么可能导致这个错误的原因是什么?
解决方案
django-firebird 的最后一个稳定版本是 1.11,它与 django 1.11 LTS 兼容。这是推荐使用的版本。检查问题
如果您使用的是Django 2.x ,则需要降级。 但是如果你使用 Python 3.8 你将无法降级!
在这种情况下,我建议使用Flask和SQLAlchemy来与 firebird 集成
推荐阅读
- android - 在android中更新Listview
- c - 从 C API 获取 Lua 标准输出
- amazon-s3 - 使用 Glue 从 AWS RDS 到 S3 的管道
- knex.js - 使用 knex.raw() 创建枚举类型时出现语法错误
- python - Python 2.7 忽略 else 和组合的“if not”语句
- python - 如何从包含 discord.py 的嵌入中获取文本?
- ruby - 在 AIX 7.1 上从源代码编译 Ruby
- javascript - 如何在javascript中定义settimeout函数
- javascript - 使用 javascript 创建累积对象
- bash - 批处理文件复制到另一个文件夹,并覆盖共享部分名称的文件