File tree Expand file tree Collapse file tree 4 files changed +49
-7
lines changed
Expand file tree Collapse file tree 4 files changed +49
-7
lines changed Original file line number Diff line number Diff line change 1+ # Virtual Environment
12/project_env
3+
4+ # Byte-compiled / optimized / DLL files
5+ __pycache__ /
6+ * .py [cod ]
7+ * $py.class
8+
9+ # C extensions
10+ * .so
11+
12+ # Distribution / packaging
13+ .Python
14+ build /
15+ develop-eggs /
16+ dist /
17+ downloads /
18+ eggs /
19+ .eggs /
20+ lib /
21+ lib64 /
22+ parts /
23+ sdist /
24+ var /
25+ wheels /
26+ share /python-wheels /
27+ * .egg-info /
28+ .installed.cfg
29+ * .egg
30+ MANIFEST
31+
32+ # Installer logs
33+ pip-log.txt
34+ pip-delete-this-directory.txt
35+
36+ # Django stuff:
37+ * .log
38+ local_settings.py
39+ db.sqlite3
40+ db.sqlite3-journal
41+
42+ # Environments
43+ .env
Original file line number Diff line number Diff line change 1+ web : gunicorn django_blog.wsgi
Original file line number Diff line number Diff line change 1313import os
1414import json
1515
16- with open ('/etc/config.json' ) as config_file :
17- config = json .load (config_file )
18-
1916# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
2017BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
2118
2421# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
2522
2623# SECURITY WARNING: keep the secret key used in production secret!
27- SECRET_KEY = config [ 'SECRET_KEY' ]
24+ SECRET_KEY = os . environ . get ( 'SECRET_KEY' )
2825
2926# SECURITY WARNING: don't run with debug turned on in production!
3027DEBUG = True
3128
32- ALLOWED_HOSTS = []
29+ ALLOWED_HOSTS = ['andrewbaldwin-django-blogger.herokuapp.com' ]
3330
3431
3532# Application definition
124121# Static files (CSS, JavaScript, Images)
125122# https://docs.djangoproject.com/en/3.0/howto/static-files/
126123
124+ STATIC_ROOT = os .path .join (BASE_DIR , 'staticfiles' )
127125STATIC_URL = '/static/'
128126
129127MEDIA_ROOT = os .path .join (BASE_DIR , 'media' )
138136EMAIL_HOST = 'smtp.gmail.com'
139137EMAIL_PORT = 587
140138EMAIL_USE_TLS = True
141- EMAIL_HOST_USER = config [ 'EMAIL_USER' ]
142- EMAIL_HOST_PASSWORD = config [ 'EMAIL_PASS' ]
139+ EMAIL_HOST_USER = os . environ . get ( 'EMAIL_USER' )
140+ EMAIL_HOST_PASSWORD = os . environ . get ( 'EMAIL_PASS' )
143141DEFAULT_FROM_EMAIL = 'CodingWithAndrewTeam <[email protected] >'
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ certifi==2018.1.18
22chardet == 3.0.4
33Django == 3.0.5
44django-crispy-forms == 1.9.0
5+ gunicorn == 20.0.4
56idna == 2.6
67Pillow == 7.1.1
78requests == 2.20.0
You can’t perform that action at this time.
0 commit comments