connect django to postgres code example
Example 1: postgres django
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'your_database_project_name',
'USER': 'your_postgres_username',
'PASSWORD': 'your_postgres_password',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
Example 2: setting up a django prostgress project
env/scripts/activate