Skip to content

Commit

Permalink
Heroku settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelmv committed Jun 21, 2017
1 parent f6e78cf commit e151f24
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn smsuela.wsgi --log-file -
9 changes: 8 additions & 1 deletion smsuela/settings.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import os
from django.core.wsgi import get_wsgi_application
import dj_database_url

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

SECRET_KEY = os.environ["SECRET_KEY"]

DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

INSTALLED_APPS = [
'home.apps.HomeConfig',
Expand Down Expand Up @@ -55,6 +58,9 @@
}
}

DATABASES['default'] = dj_database_url.config()


AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
Expand All @@ -81,3 +87,4 @@
USE_TZ = True

STATIC_URL = '/static/'
STATIC_ROOT = 'staticfiles'
3 changes: 2 additions & 1 deletion smsuela/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import os

from django.core.wsgi import get_wsgi_application
from dj_static import Cling

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "smsuela.settings")

application = get_wsgi_application()
application = Cling(get_wsgi_application())

0 comments on commit e151f24

Please sign in to comment.