简体   繁体   中英

django.db.utils.OperationalError: FATAL: database “clinilead_e ” does not exist

After changing the db from sqlite to postgresql(python manage.py makemigrations)running, I am getting this error.How could i overcome this?

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'clinilead_e ',
    'USER': 'postgres',
    'PASSWORD': 'password',
    'HOST': '127.0.0.1',
    'PORT': '5432',
  }
}

在postgres中,与sqlite不同,您必须创建数据库。

$ createdb clinilead_e

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM