Skip to content

Commit

Permalink
Settings to postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalRu committed Sep 22, 2023
1 parent 517854a commit 4fce1e9
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions backend/foodgram/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')


DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql',
# 'NAME': os.getenv('POSTGRES_DB', 'django'),
# 'USER': os.getenv('POSTGRES_USER', 'django'),
# 'PASSWORD': os.getenv('POSTGRES_PASSWORD', ''),
# 'HOST': os.getenv('DB_HOST', ''),
# 'PORT': os.getenv('DB_PORT', 5432)
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
# }
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.getenv('POSTGRES_DB', 'django'),
'USER': os.getenv('POSTGRES_USER', 'django'),
'PASSWORD': os.getenv('POSTGRES_PASSWORD', ''),
'HOST': os.getenv('DB_HOST', ''),
'PORT': os.getenv('DB_PORT', 5432)
}
}


REST_FRAMEWORK = {
Expand Down

0 comments on commit 4fce1e9

Please sign in to comment.