heroku.py 839 B

1234567891011121314151617181920212223242526272829
  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 = ['*', 'wagtailbakerydemo.herokuapp.com']
  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'
  16. try:
  17. from .local import *
  18. except ImportError:
  19. pass