Error when trying to conect to MS SQL backend

In the follow on to the previous post I’m getting what appears to be a common issue (there are posts from June/August 2020 with the same error):

(<class ‘django.core.exceptions.ImproperlyConfigured’>, ImproperlyConfigured("‘sql_server.pyodbc’ isn’t an available database backend or couldn’t be imported. Check the above exception. To use one of the built-in backends, use ‘django.db.backends.XXX’, where XXX is one of:\n ‘mysql’, ‘oracle’, ‘postgresql’, ‘sqlite3’"), <traceback object at 0x7f4396885b40>)

But no-one posted back the solutions.

The code breaks at line 122 in Utils.py:

        if backend_name not in ['django.db.backends.%s' % b for b in builtin_backends]:
            backend_reprs = map(repr, sorted(builtin_backends))
            raise ImproperlyConfigured(
                "%r isn't an available database backend or couldn't be "
                "imported. Check the above exception. To use one of the "
                "built-in backends, use 'django.db.backends.XXX', where XXX "
                "is one of:\n"
                "    %s" % (backend_name, ", ".join(backend_reprs))
            ) from e_user

And as can be seen the issue is obvious…MS SQL server clearly isn’t a member of django.db.backends.

Which indicates that I’m missing a reference somewhere. The django-mssql-backend · PyPI site says that this is all that is needed:

DATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',

But clearly it isn’t. Anyone know how to fix this?

OK, so connecting to a SQL server is niche. That’s useful to know.

It turns out that if I run my project ye olde worlde way “python3 manage.py runserver” it works…or at least it moves on to an error about the very basic model I’ve created.

So the issue is my IDE, PyCharm. I’ll take the matter up with them and soldier on without debugging tools.