I'm learning python and I want to understand the database section and when setting up for postgresql database.
https://docs.djangoproject.com/en/1.9/ref/settings/#databases
Are all the values necessary?
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'mydatabase',
'USER': 'mydatabaseuser',
'PASSWORD': 'mypassword',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
Specifically USER, PASSWORD, HOST, PORT? Is USER and PASSWORD values that we can create in django settings.py? Or is this the actual USER/PASSWORD of the database? Also, HOST is currently 127.0.0.1 for localhost, but when deploying to production, do I change this to the domain name (http://www.example.com)? And PORT, is it necessary?
DATABASES['default'] = dj_database_url.config(default="postgres://USER:PASSWORD@HOST:PORT/NAME")