Home > database >  "django.core.exceptions.ImproperlyConfigured:" while doing migrations to posgreSQL
"django.core.exceptions.ImproperlyConfigured:" while doing migrations to posgreSQL

Time:10-31

I created a table in models.py and also added the connection to my PostgreSQL database in settings.py. But when I do the migrations in the command prompt I get these error

`

django.core.exceptions.ImproperlyConfigured: 'django.db.backends.posgresql' 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:
    'mysql', 'oracle', 'postgresql', 'sqlite3'

`

I have installed Django through command prompt but still I don't know why I get these error. I was expecting a successful migration of my table to PostgreSQL data base.

CodePudding user response:

This is caused due to a typo in

django.db.backends.posgresql

You forget to put the letter t

django.db.backends.postgresql

CodePudding user response:

It's a common a mistake

'django.db.backends.posgresql'

You made a typo here. Forgot to add the 't' in postgresql

'django.db.backends.postgresql'

This should fix the error

CodePudding user response:

you have typo here. fix it and the problem will be solved

CodePudding user response:

Inside DATABASES, there is a typo error in your ENGINE. It must be django.db.backends.postgresql.

  • Related