2
0

heroku.py 746 B

123456789101112131415161718192021222324
  1. import dj_database_url
  2. from .base import *
  3. DEBUG = True
  4. # Accept all hostnames, since we don't know in advance which hostname will be used for any given Heroku instance.
  5. # IMPORTANT: Set this to a real hostname when using this in production!
  6. # See https://docs.djangoproject.com/en/1.10/ref/settings/#allowed-hosts
  7. ALLOWED_HOSTS = ['*', ]
  8. EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  9. # BASE_URL required for notification emails
  10. BASE_URL = 'http://localhost:8000'
  11. db_from_env = dj_database_url.config(conn_max_age=500)
  12. DATABASES['default'].update(db_from_env)
  13. # Simplified static file serving.
  14. # https://warehouse.python.org/project/whitenoise/
  15. STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'