File tree 4 files changed +27
-8
lines changed
4 files changed +27
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ applications :
3
+ - name : ih-superlists
4
+ memory : 512M
5
+ instances : 1
6
+ buildpack : python_buildpack
7
+ command : python manage.py collectstatic --noinput && gunicorn superlists.wsgi:application
Original file line number Diff line number Diff line change 1
1
django == 1.11
2
2
gunicorn == 19.7.1
3
+ whitenoise == 3.3.1
4
+ dj-database-url == 0.4.2
5
+ psycopg2 == 2.7.3.1
Original file line number Diff line number Diff line change
1
+ python-3.6.2
Original file line number Diff line number Diff line change 11
11
"""
12
12
13
13
import os
14
+ import dj_database_url
14
15
15
16
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16
17
BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
23
24
SECRET_KEY = 's&fct_9our6wa6!kk70lsfs#sqp=%225kz5%0)u7x4$@**y+l)'
24
25
25
26
# SECURITY WARNING: don't run with debug turned on in production!
26
- DEBUG = True
27
27
28
- ALLOWED_HOSTS = []
28
+ DEBUG = False
29
+
30
+ ALLOWED_HOSTS = ['ih-superlists.cfapps.io' ]
29
31
30
32
31
33
# Application definition
42
44
43
45
MIDDLEWARE = [
44
46
'django.middleware.security.SecurityMiddleware' ,
47
+ 'whitenoise.middleware.WhiteNoiseMiddleware' ,
45
48
'django.contrib.sessions.middleware.SessionMiddleware' ,
46
49
'django.middleware.common.CommonMiddleware' ,
47
50
'django.middleware.csrf.CsrfViewMiddleware' ,
74
77
# Database
75
78
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
76
79
77
- DATABASES = {
78
- 'default' : {
79
- 'ENGINE' : 'django.db.backends.sqlite3' ,
80
- 'NAME' : os .path .join (BASE_DIR , 'db.sqlite3' ),
81
- }
82
- }
80
+
81
+ #DATABASES = {
82
+ # 'default': {
83
+ # 'ENGINE': 'django.db.backends.sqlite3',
84
+ # 'NAME': os.path.join(BASE_DIR, '../database/db.sqlite3'),
85
+ # }
86
+ #}
87
+ print ("DATABASE_URL=" + os .environ .get ('DATABASE_URL' , 'NOT_SPECIFIED' ))
88
+ LOCAL_SQLITE = 'sqlite:///' + os .path .abspath (os .path .join (BASE_DIR , '../database/db.sqlite3' ))
89
+ DATABASES = {}
90
+ DATABASES ['default' ] = dj_database_url .config (default = LOCAL_SQLITE )
83
91
84
92
85
93
# Password validation
You can’t perform that action at this time.
0 commit comments