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?