· 8 years ago · Oct 08, 2017, 08:20 PM
12017-10-08T19:33:03.000000+00:00 app[api]: Build started by user me@email.com
22017-10-08T19:33:19.148973+00:00 heroku[web.1]: Restarting
32017-10-08T19:33:19.149620+00:00 heroku[web.1]: State changed from up to starting
42017-10-08T19:33:19.717815+00:00 heroku[web.1]: Stopping all processes with SIGTERM
52017-10-08T19:33:19.732436+00:00 app[web.1]: [2017-10-08 19:33:19 +0000] [4] [INFO] Handling signal: term
62017-10-08T19:33:19.732487+00:00 app[web.1]: [2017-10-08 19:33:19 +0000] [8] [INFO] Worker exiting (pid: 8)
72017-10-08T19:33:19.732716+00:00 app[web.1]: [2017-10-08 19:33:19 +0000] [9] [INFO] Worker exiting (pid: 9)
82017-10-08T19:33:19.833095+00:00 app[web.1]: [2017-10-08 19:33:19 +0000] [4] [INFO] Shutting down: Master
92017-10-08T19:33:20.012423+00:00 heroku[web.1]: Process exited with status 0
102017-10-08T19:33:18.676112+00:00 app[api]: Release v30 created by user me@email.com
112017-10-08T19:33:18.676112+00:00 app[api]: Deploy 8f625678 by user me@email.com
122017-10-08T19:33:03.000000+00:00 app[api]: Build succeeded
132017-10-08T19:33:29.936137+00:00 heroku[web.1]: Starting process with command `gunicorn portfolio.wsgi`
142017-10-08T19:33:32.419548+00:00 app[web.1]: [2017-10-08 19:33:32 +0000] [4] [INFO] Starting gunicorn 19.6.0
152017-10-08T19:33:32.420072+00:00 app[web.1]: [2017-10-08 19:33:32 +0000] [4] [INFO] Listening at: http://0.0.0.0:23534 (4)
162017-10-08T19:33:32.420207+00:00 app[web.1]: [2017-10-08 19:33:32 +0000] [4] [INFO] Using worker: sync
172017-10-08T19:33:32.424142+00:00 app[web.1]: [2017-10-08 19:33:32 +0000] [8] [INFO] Booting worker with pid: 8
182017-10-08T19:33:32.523409+00:00 app[web.1]: [2017-10-08 19:33:32 +0000] [9] [INFO] Booting worker with pid: 9
192017-10-08T19:33:33.592588+00:00 heroku[web.1]: State changed from starting to up
202017-10-08T19:33:33.991800+00:00 heroku[router]: at=info method=GET path="/" host=myproject.herokuapp.com request_id=89d87c81-0ab1-4b
212e-8705-43ef55710082 fwd="my.public.ip.address" dyno=web.1 connect=0ms service=225ms status=500 bytes=234 protocol=https
222017-10-08T19:33:36.569500+00:00 heroku[router]: at=info method=GET path="/" host=myproject.herokuapp.com request_id=cb8ea686-89ba-44
230f-8e66-0c3258c2de92 fwd="my.public.ip.address" dyno=web.1 connect=0ms service=42ms status=500 bytes=234 protocol=https
24
25from .base_settings import *
26from .production_settings import *
27
28try:
29 from .local_settings import *
30except:
31 pass
32
33import os, dj_database_url
34
35BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
36PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
37
38DEBUG = ""
39
40
41INSTALLED_APPS = [
42 'django.contrib.admin',
43 'django.contrib.auth',
44 'django.contrib.contenttypes',
45 'django.contrib.sessions',
46 'django.contrib.messages',
47 # Disable Django's own staticfiles handling in favour of WhiteNoise, for
48 # greater consistency between gunicorn and `./manage.py runserver`. See:
49 # http://whitenoise.evans.io/en/stable/django.html#using-whitenoise-in-development
50 'whitenoise.runserver_nostatic',
51 'django.contrib.staticfiles',
52 'app ',
53 'app',
54]
55
56MIDDLEWARE = [
57 'django.middleware.security.SecurityMiddleware',
58 'whitenoise.middleware.WhiteNoiseMiddleware',
59 'django.contrib.sessions.middleware.SessionMiddleware',
60 'django.middleware.common.CommonMiddleware',
61 'django.middleware.csrf.CsrfViewMiddleware',
62 'django.contrib.auth.middleware.AuthenticationMiddleware',
63 'django.contrib.messages.middleware.MessageMiddleware',
64 'django.middleware.clickjacking.XFrameOptionsMiddleware',
65]
66
67ROOT_URLCONF = 'project.urls'
68
69TEMPLATES = [
70 {
71 'BACKEND': 'django.template.backends.django.DjangoTemplates',
72 'DIRS': [],
73 'APP_DIRS': True,
74 'OPTIONS': {
75 'context_processors': [
76 'django.template.context_processors.debug',
77 'django.template.context_processors.request',
78 'django.contrib.auth.context_processors.auth',
79 'django.contrib.messages.context_processors.messages',
80 ],
81 'debug': DEBUG,
82 },
83 },
84]
85
86WSGI_APPLICATION = 'project.wsgi.application'
87
88
89DATABASES = {
90 'default': {
91 'ENGINE': 'django.db.backends.sqlite3',
92 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
93 }
94}
95
96AUTH_PASSWORD_VALIDATORS = [
97 {
98 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
99 },
100 {
101 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
102 },
103 {
104 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
105 },
106 {
107 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
108 },
109]
110
111
112LANGUAGE_CODE = 'en-us'
113TIME_ZONE = 'UTC'
114USE_I18N = True
115USE_L10N = True
116USE_TZ = True
117
118# Change 'default' database configuration with $DATABASE_URL.
119DATABASES['default'].update(dj_database_url.config(conn_max_age=500))
120
121# Honor the 'X-Forwarded-Proto' header for request.is_secure()
122SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
123
124# Allow all host headers
125ALLOWED_HOSTS = ['myproject.herokuapp.com', 'localhost']
126
127# Static files (CSS, JavaScript, Images)
128# https://docs.djangoproject.com/en/1.11/howto/static-files/
129
130STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
131STATIC_URL = '/static/'
132
133# Extra places for collectstatic to find static files.
134STATICFILES_DIRS = [
135 os.path.join(PROJECT_ROOT, 'static'),
136]
137
138# Simplified static file serving.
139# https://warehouse.python.org/project/whitenoise/
140STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
141
142from .base_settings import *
143
144SECRET_KEY = 'mysecretkey'
145
146DEBUG = True
147
148from .base_settings import *
149
150SECRET_KEY = os.environ.get('SECRET_KEY')
151
152DEBUG = False