Skip to content

Commit

Permalink
Update settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sherif-abdallah authored Aug 9, 2022
1 parent 542a289 commit c5e6ccf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions social/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases

if PRODUCTION:
if PRODUCTION == "True":
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
Expand Down Expand Up @@ -195,7 +195,10 @@


# Path where media is stored
MEDIA_ROOT = os.path.join(BASE_DIR_ROOT, 'media/')
if PRODUCTION == "True":
MEDIA_ROOT = os.path.join(BASE_DIR_ROOT, 'media/')
else:
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')


# Default primary key field type
Expand Down

0 comments on commit c5e6ccf

Please sign in to comment.