Monday, June 26, 2017

'migrate' does not find existing postgres database

This is my first django project and is intended for my own use, but I'll
put it on git-hub when it's working.

The database backend is postgresql-9.6.3 and exists in /var/www/htdocs/.
When I run 'python3 manage.py migrate' django looks for the database in
~/development/crm_project/crm/ and does not find it there. In settings.py I
have defined the engine:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.path.join(BASE_DIR, 'crm'),
'USER': 'rshepard',
'PASSWORD': '<redacted>',
'HOST': '',
'PORT': '5432',
}
}

Again, this is for my use and the database with its existing tables lives
in the same cluster with all my other databases. And, each table will be a
separate app; the models have been translated from sql to django.

I'd appreciate suggestions on how to proceed.

Rich

No comments:

Post a Comment