Skip to content

Commit

Permalink
Production set up
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEZE1020 committed Jan 12, 2025
1 parent b2d7855 commit 0dbc2e9
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions social_media_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import os
from pathlib import Path
from dotenv import load_dotenv
import dj_database_url


load_dotenv()

Expand Down Expand Up @@ -107,16 +109,7 @@

# settings.py

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.getenv('DATABASE_NAME'),
'USER': os.getenv('DATABASE_USER'),
'PASSWORD': os.getenv('DATABASE_PASSWORD'),
'HOST': os.getenv('DATABASE_HOST'),
'PORT': os.getenv('DATABASE_PORT'),
}
}
DATABASES = { 'default': dj_database_url.config(conn_max_age=600) }



Expand Down

0 comments on commit 0dbc2e9

Please sign in to comment.