heroku.py 732 B

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