Skip to content

Commit 9998b3f

Browse files
installed and wrote django rest_framework in settings.py
1 parent 8ad14fa commit 9998b3f

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

src/goal3/settings.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
Django settings for goal3 project.
1+
"""Django settings for goal3 project.
32
43
Generated by 'django-admin startproject' using Django 3.0.6.
54
@@ -20,6 +19,15 @@
2019
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
2120

2221
# SECURITY WARNING: keep the secret key used in production secret!
22+
import os
23+
import dotenv
24+
25+
# Add .env variables anywhere before SECRET_KEY
26+
dotenv_file = os.path.join(BASE_DIR, ".env")
27+
if os.path.isfile(dotenv_file):
28+
dotenv.load_dotenv(dotenv_file)
29+
30+
# Update secret key
2331
SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
2432

2533
# SECURITY WARNING: don't run with debug turned on in production!
@@ -37,6 +45,7 @@
3745
'django.contrib.sessions',
3846
'django.contrib.messages',
3947
'django.contrib.staticfiles',
48+
'rest_framework',
4049
]
4150

4251
MIDDLEWARE = [

src/requirements.txt

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
asgiref==3.2.7
2+
astroid==2.4.1
3+
colorama==0.4.3
24
Django==3.0.6
5+
djangorestframework==3.11.0
6+
isort==4.3.21
7+
lazy-object-proxy==1.4.3
8+
mccabe==0.6.1
39
psycopg2==2.8.5
10+
pylint==2.5.2
11+
python-dotenv==0.13.0
412
pytz==2020.1
13+
six==1.14.0
514
sqlparse==0.3.1
15+
toml==0.10.1
16+
wrapt==1.12.1

0 commit comments

Comments
 (0)