<commit_before>from __future__ import absolute_import

import dj_database_url

from os import environ
from .base import *
from .s3 import *

ENV = 'HEROKU'
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
DEBUG = os.environ.get('DEBUG', False)
TEMPLATE_DEBUG = DEBUG

DATABASES = { 'default': dj_database_url.config() }

EMAIL_HOST_USER = os.environ['SENDGRID_USERNAME']
EMAIL_HOST= 'smtp.sendgrid.net'
EMAIL_PORT = 587
EMAIL_HOST_PASSWORD = os.environ['SENDGRID_PASSWORD']
EMAIL_USE_TLS = True

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
        'URL': os.environ['BONSAI_URL'],
        'INDEX_NAME': 'qa',
    },
}
ANALYTICS_ID = os.environ.get('ANALYTICS_ID')<commit_msg>adding ALLOWED_HOSTS to solve a SuspiciousOperation exception<commit_after>from __future__ import absolute_import

import dj_database_url

from os import environ
from .base import *
from .s3 import *

ALLOWED_HOSTS = (".herokuapp.com", )
ENV = 'HEROKU'
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
DEBUG = os.environ.get('DEBUG', False)
TEMPLATE_DEBUG = DEBUG

DATABASES = { 'default': dj_database_url.config() }

EMAIL_HOST_USER = os.environ['SENDGRID_USERNAME']
EMAIL_HOST= 'smtp.sendgrid.net'
EMAIL_PORT = 587
EMAIL_HOST_PASSWORD = os.environ['SENDGRID_PASSWORD']
EMAIL_USE_TLS = True

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
        'URL': os.environ['BONSAI_URL'],
        'INDEX_NAME': 'qa',
    },
}
ANALYTICS_ID = os.environ.get('ANALYTICS_ID')
{'fraction_non_alphanumeric': 0.1221183800623053, 'fraction_numerical': 0.004984423676012461, 'mean_word_length': 5.298039215686274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6238826', 'n_tokens_mistral': 616, 'n_tokens_neox': 615, 'n_words': 103}