"django.core.exceptions.ImproperlyConfigured:" while doing migrations to posgreSQL
Question:
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.
Answers:
This is caused due to a typo while writing:
django.db.backends.posgresql
You forget to put the letter t
so:
django.db.backends.postgresql
Inside DATABASES
, there is a typo
error in your ENGINE
. It must be django.db.backends.postgresql
.
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
you have typo here. fix it and the problem will be solved
This is caused due to a typo while writing:
django.db.backends.posgresql
You forget to put the letter t so:
django.db.backends.postgresql
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.
This is caused due to a typo while writing:
django.db.backends.posgresql
You forget to put the letter t
so:
django.db.backends.postgresql
Inside DATABASES
, there is a typo
error in your ENGINE
. It must be django.db.backends.postgresql
.
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
you have typo here. fix it and the problem will be solved
This is caused due to a typo while writing:
django.db.backends.posgresql
You forget to put the letter t so:
django.db.backends.postgresql