1

First time using Django, so I looked up a tutorial - I followed this link and everything went fine, until I had to adjust the settings.py file, where I followed this other link and got this error:

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'

I have django-firebird installed via pip install django-firebird, I have a different python script which uses import fdb just fine, and I have been able to access my firebird database regularly with the other python script, so what could be causing this error?

ps.: This and this branched out from the first link mentioned as the follow-up steps.

2 Answers2

1

The last stable release of django-firebird is 1.11 which is compatible with django 1.11 LTS. This is the recommended version to use. Check the Issue

If you are using Django 2.x you need to downgrade. But if you use Python 3.8 you will not be able to downgrade!

In this case I would recommend using Flask with SQLAlchemy to integrate with firebird

  • 1
    [But according to this](https://docs.djangoproject.com/en/3.0/faq/install/#faq-python-version-support) I can't downgrade, since I'm using python 3.8... Is there another option? –  Feb 10 '20 at 14:40
  • @5Daydreams maybe the best solution is use another database, Django work's great with PostgreSQL – Gabriel Rodrigues Segalla Feb 10 '20 at 14:44
  • 1
    What I'm supposed to build has to use firebird, though... Is there something other than Django that I can use with python 3.8 that can work with firebird? –  Feb 10 '20 at 14:47
  • 1
    @5Daydreams If you need to use Firebird, and Django is not a requirement, i recommend to use Flask with SQLAlchemy to integrate with firebird https://docs.sqlalchemy.org/en/13/dialects/firebird.html – Gabriel Rodrigues Segalla Feb 10 '20 at 15:05
  • 1
    Alright, you should edit your answer when possible - thanks a lot! –  Feb 10 '20 at 15:27
  • OTOH how hard should it be to port Django DB plugin from Django 1.x API to Django 2.x API ? I do not think there was a lot of changes there, DB access APIs should more follow database realities, than Django's. Maybe one just could look how other DB plugins were upgraded to Django 2 and do the same with Firebird plugin? – Arioch 'The Feb 11 '20 at 10:33
0

For Django 2.2.x we recommend stable/2.2.x branch with support for firebird 3 and python 3.8 , first pre release is here

https://pypi.org/project/django-firebird/2.2a1/

Mariuz
  • 1,190
  • 2
  • 10
  • 19