Skip to content

Commit

Permalink
Merge pull request #105 from ChaudharyRaman/main
Browse files Browse the repository at this point in the history
Deploy Backend
  • Loading branch information
ChaudharyRaman authored Dec 6, 2023
2 parents 0936049 + 7d6d40f commit b1d717a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions backend/.env.template
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DJANGO_SECRET=
DATABASE_URL=
7 changes: 5 additions & 2 deletions backend/core/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from pathlib import Path
from dotenv import load_dotenv
import dj_database_url

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand All @@ -14,7 +15,7 @@
SECRET_KEY = os.environ.get('DJANGO_SECRET', 'default')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = os.environ.get('DJANGO_DEBUG', "False").lower == 'true'

ALLOWED_HOSTS = ['*']
# ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS').split(' ')
Expand Down Expand Up @@ -95,10 +96,12 @@
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
# dj_database_url.config(default=os.environ.get('DATABASE_URL'))
# dj_database_url.parse(os.environ.get("DATABASE_URL"))
}
}


DATABASES['default'] = dj_database_url.parse(os.environ.get("DATABASE_URL"))
# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators

Expand Down
6 changes: 5 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
asgiref==3.7.2
backports.zoneinfo==0.2.1;python_version<"3.9"
dj-database-url==2.1.0
Django==4.2
django-cors-headers==4.1.0
django-extensions==3.2.1
django-filter==22.1
djangorestframework==3.14.0
djangorestframework-simplejwt==5.2.2
exceptiongroup==1.1.2
gunicorn==21.2.0
inflection==0.5.1
iniconfig==2.0.0
packaging==23.1
Pillow==10.0.0
pluggy==1.2.0
psycopg2-binary==2.9.9
PyJWT==2.7.0
pytest==7.4.0
pytest-django==4.5.2
python-dotenv==1.0.0
pytz==2023.3
Pillow==10.0.0
sqlparse==0.4.4
tomli==2.0.1
typing_extensions==4.6.3
Expand Down

0 comments on commit b1d717a

Please sign in to comment.