Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrealmar/66a73ba4e37a078d5da197deda204f05 to your computer and use it in GitHub Desktop.
Save andrealmar/66a73ba4e37a078d5da197deda204f05 to your computer and use it in GitHub Desktop.
connect Postgres to Django
on settings.py change the DATABASES config to something like this:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": "[YOUR_DATABASE_NAME]",
"USER": "[YOUR_USER_NAME]",
"PASSWORD": "",
"HOST": "localhost",
"PORT": "",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment