More envs
This commit is contained in:
parent
523e27694a
commit
daef806507
5 changed files with 71 additions and 39 deletions
|
|
@ -16,11 +16,11 @@ import os
|
|||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'note_db',
|
||||
'USER': 'note',
|
||||
'PASSWORD': 'update_in_env_variable',
|
||||
'HOST': '127.0.0.1',
|
||||
'PORT': '',
|
||||
'NAME': os.environ.get('DJANGO_DB_NAME', 'note_db'),
|
||||
'USER': os.environ.get('DJANGO_DB_USER', 'note'),
|
||||
'PASSWORD': os.environ.get('DJANGO_DB_PASSWORD', 'CHANGE_ME_IN_ENV_SETTINGS'),
|
||||
'HOST': os.environ.get('DJANGO_DB_HOST', 'localhost'),
|
||||
'PORT': os.environ.get('DJANGO_DB_PORT', ''), # Use default port
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -28,7 +28,9 @@ DATABASES = {
|
|||
DEBUG = True
|
||||
|
||||
# Mandatory !
|
||||
ALLOWED_HOSTS = []
|
||||
ALLOWED_HOSTS = [os.environ.get('NOTE_URL', 'localhost')]
|
||||
|
||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'CHANGE_ME_IN_ENV_SETTINGS')
|
||||
|
||||
# Emails
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue