update
This commit is contained in:
@ -10,7 +10,6 @@ For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/3.2/ref/settings/
|
||||
"""
|
||||
import os
|
||||
import dj_database_url
|
||||
from pathlib import Path
|
||||
from django.db.backends.signals import connection_created
|
||||
|
||||
@ -75,9 +74,14 @@ TEMPLATES = [
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
"default": dj_database_url.config(
|
||||
default=f"postgres://{os.environ.get('DB_USER')}:{os.environ.get('DB_PASSWORD')}@{os.environ.get('DB_HOST')}:{os.environ.get('DB_PORT')}/{os.environ.get('DB_NAME')}"
|
||||
)
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": os.environ.get("POSTGRES_NAME"),
|
||||
"USER": os.environ.get("POSTGRES_USER"),
|
||||
"PASSWORD": os.environ.get("POSTGRES_PASSWORD"),
|
||||
"HOST": os.environ.get("POSTGRES_HOST"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT"),
|
||||
}
|
||||
}
|
||||
|
||||
# Password validation
|
||||
|
Reference in New Issue
Block a user