Skip to content

Instantly share code, notes, and snippets.

@leihuagh
Created January 2, 2019 00:18
Show Gist options
  • Save leihuagh/de3fa6c7aa3ebc2b159542cbe51833e9 to your computer and use it in GitHub Desktop.
Save leihuagh/de3fa6c7aa3ebc2b159542cbe51833e9 to your computer and use it in GitHub Desktop.
django connect to postgresql
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '<your database name>',
'USER': '<username>',
'PASSWORD': '<password>',
'HOST': 'localhost',
'PORT': '5433'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment