mybuddy/babybuddy/settings/render.py

20 lines
499 B
Python

import dj_database_url
from .base import *
RENDER_EXTERNAL_HOSTNAME = os.environ.get('RENDER_EXTERNAL_HOSTNAME')
if RENDER_EXTERNAL_HOSTNAME:
ALLOWED_HOSTS.append(RENDER_EXTERNAL_HOSTNAME)
CSRF_TRUSTED_ORIGINS = "https://" + RENDER_EXTERNAL_HOSTNAME
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
'default': dj_database_url.config(
default='postgresql://postgres:postgres@localhost:5432/babybuddy',
conn_max_age=600
)
}