<commit_before>import os
import dj_database_url
from djangode.conf.global_settings import *

ALLOWED_HOSTS = ['*']

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', None)

DEBUG = os.environ.get('DJANGO_DEBUG', False) == "True"  # Set env var to "True"

ADMINS = (
    ('Django e.V.', os.environ.get('DJANGO_ADMIN_EMAIL')),
)

MANAGERS = ADMINS

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

INSTALLED_APPS += (
    'raven.contrib.django.raven_compat',
    'storages',
)

# Otherwise unable to login on http Heroku
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False

# ==============================================================================
# Sentry
# ==============================================================================

# export RAVEN_DSN=https://<key>:<sec>@sentry.example.com/1
RAVEN_DSN = os.environ.get('RAVEN_DSN', None)
RAVEN_CONFIG = {'dsn': RAVEN_DSN}


#==============================================================================
# Store media uploads on S3
#==============================================================================

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

MIDDLEWARE_CLASSES.insert(0, 'whitenoise.middleware.WhiteNoiseMiddleware')

# Use Amazon S3 for storage for uploaded media files.
DEFAULT_FILE_STORAGE = "storages.backends.s3boto.S3BotoStorage"
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

# Amazon S3 settings.
AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "")
AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "")
AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME", "")
AWS_AUTO_CREATE_BUCKET = False<commit_msg>Redirect to https<commit_after>import os
import dj_database_url
from djangode.conf.global_settings import *

ALLOWED_HOSTS = ['*']

SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', None)

DEBUG = os.environ.get('DJANGO_DEBUG', False) == "True"  # Set env var to "True"

ADMINS = (
    ('Django e.V.', os.environ.get('DJANGO_ADMIN_EMAIL')),
)

MANAGERS = ADMINS

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

INSTALLED_APPS += (
    'raven.contrib.django.raven_compat',
    'storages',
)

# Otherwise unable to login on http Heroku
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False

# Redirect to https
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True

# ==============================================================================
# Sentry
# ==============================================================================

# export RAVEN_DSN=https://<key>:<sec>@sentry.example.com/1
RAVEN_DSN = os.environ.get('RAVEN_DSN', None)
RAVEN_CONFIG = {'dsn': RAVEN_DSN}


#==============================================================================
# Store media uploads on S3
#==============================================================================

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

MIDDLEWARE_CLASSES.insert(0, 'whitenoise.middleware.WhiteNoiseMiddleware')

# Use Amazon S3 for storage for uploaded media files.
DEFAULT_FILE_STORAGE = "storages.backends.s3boto.S3BotoStorage"
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

# Amazon S3 settings.
AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "")
AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "")
AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME", "")
AWS_AUTO_CREATE_BUCKET = False
{'fraction_non_alphanumeric': 0.27713884992987375, 'fraction_numerical': 0.0061711079943899015, 'mean_word_length': 7.4904761904761905, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '5302506', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1233, 'n_words': 182}