<commit_before>from __future__ import absolute_import
import os
import urlparse
import dj_database_url

from djangosnippets.settings.base import *

TEMPLATE_LOADERS = (
    ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS),
)

# Heroku needs Gunicorn specifically.
INSTALLED_APPS += ('gunicorn',)

AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY']
AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME']
AWS_PRELOAD_METADATA = True
AWS_IS_GZIPPED = True
AWS_S3_SECURE_URLS = True
AWS_QUERYSTRING_AUTH = False

INSTALLED_APPS += ('djangosecure',)
MIDDLEWARE_CLASSES.insert(0, 'djangosecure.middleware.SecurityMiddleware')
SECURE_SSL_REDIRECT = True
SECURE_HSTS_SECONDS = 600
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_FRAME_DENY = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True

# The header Heroku uses to indicate SSL:
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

ALLOWED_HOSTS = [
    'djangosnippets.org',
]
<commit_msg>Use the right way to extend.<commit_after>from __future__ import absolute_import
import os
import urlparse
import dj_database_url

from djangosnippets.settings.base import *

TEMPLATE_LOADERS = (
    ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS),
)

# Heroku needs Gunicorn specifically.
INSTALLED_APPS += ('gunicorn',)

AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY']
AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME']
AWS_PRELOAD_METADATA = True
AWS_IS_GZIPPED = True
AWS_S3_SECURE_URLS = True
AWS_QUERYSTRING_AUTH = False

INSTALLED_APPS += ('djangosecure',)
MIDDLEWARE_CLASSES = (('djangosecure.middleware.SecurityMiddleware',) +
                      MIDDLEWARE_CLASSES)
SECURE_SSL_REDIRECT = True
SECURE_HSTS_SECONDS = 600
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_FRAME_DENY = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True

# The header Heroku uses to indicate SSL:
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

ALLOWED_HOSTS = [
    'djangosnippets.org',
]

{'fraction_non_alphanumeric': 0.08098591549295775, 'fraction_numerical': 0.003961267605633803, 'mean_word_length': 7.146953405017921, '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': '3088918', 'n_tokens_mistral': 929, 'n_tokens_neox': 893, 'n_words': 142}