<commit_before>"""Development settings and globals."""
from os.path import join, normpath
from os import environ
from base import *
from django.core.exceptions import ImproperlyConfigured

def get_env_setting(setting):
    """ Get the environment setting or return exception """
    try:
        return environ[setting]
    except KeyError:
        error_msg = "Set the %s env variable" % setting
        raise ImproperlyConfigured(error_msg)

########## DEBUG CONFIGURATION
DEBUG = True
THUMBNAIL_DEBUG = True
TEMPLATE_DEBUG = DEBUG
########## END DEBUG CONFIGURATION


########## EMAIL CONFIGURATION
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_HOST_PASSWORD = get_env_setting('{{ project_name }}_EMAIL_PASS')
EMAIL_HOST_USER = get_env_setting('{{ project_name }}_EMAIL_USER')
EMAIL_HOST = get_env_setting('{{ project_name }}_EMAIL_HOST')
EMAIL_PORT = get_env_setting('{{ project_name }}_EMAIL_PORT')
EMAIL_SUBJECT_PREFIX = '[%s] ' % SITE_NAME
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER
########## END EMAIL CONFIGURATION


########## DATABASE CONFIGURATION
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': get_env_setting('{{ project_name }}_DB_NAME'),
        'USER': get_env_setting('{{ project_name }}_DB_USER'),
        'PASSWORD': get_env_setting('{{ project_name }}_DB_PASS'),
        'HOST': get_env_setting('{{ project_name }}_DB_HOST'),
        'PORT': get_env_setting('{{ project_name }}_DB_PORT'),
    }                                             
}
########## END DATABASE CONFIGURATION


########## CACHE CONFIGURATION
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    }
}
########## END CACHE CONFIGURATION


########## TOOLBAR CONFIGURATION
INSTALLED_APPS += (
    'debug_toolbar',
)
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
    'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_CONFIG = {
    'INTERCEPT_REDIRECTS': False,
    'SHOW_TEMPLATE_CONTEXT': True,
}
########## END TOOLBAR CONFIGURATION

########## SECRET CONFIGURATION
SECRET_KEY = get_env_setting('{{ project_name }}_SECRET_KEY'
########## END SECRET CONFIGURATION
<commit_msg>forgot a bracket<commit_after>"""Development settings and globals."""
from os.path import join, normpath
from os import environ
from base import *
from django.core.exceptions import ImproperlyConfigured

def get_env_setting(setting):
    """ Get the environment setting or return exception """
    try:
        return environ[setting]
    except KeyError:
        error_msg = "Set the %s env variable" % setting
        raise ImproperlyConfigured(error_msg)

########## DEBUG CONFIGURATION
DEBUG = True
THUMBNAIL_DEBUG = True
TEMPLATE_DEBUG = DEBUG
########## END DEBUG CONFIGURATION


########## EMAIL CONFIGURATION
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_HOST_PASSWORD = get_env_setting('{{ project_name }}_EMAIL_PASS')
EMAIL_HOST_USER = get_env_setting('{{ project_name }}_EMAIL_USER')
EMAIL_HOST = get_env_setting('{{ project_name }}_EMAIL_HOST')
EMAIL_PORT = get_env_setting('{{ project_name }}_EMAIL_PORT')
EMAIL_SUBJECT_PREFIX = '[%s] ' % SITE_NAME
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER
########## END EMAIL CONFIGURATION


########## DATABASE CONFIGURATION
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': get_env_setting('{{ project_name }}_DB_NAME'),
        'USER': get_env_setting('{{ project_name }}_DB_USER'),
        'PASSWORD': get_env_setting('{{ project_name }}_DB_PASS'),
        'HOST': get_env_setting('{{ project_name }}_DB_HOST'),
        'PORT': get_env_setting('{{ project_name }}_DB_PORT'),
    }                                             
}
########## END DATABASE CONFIGURATION


########## CACHE CONFIGURATION
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    }
}
########## END CACHE CONFIGURATION


########## TOOLBAR CONFIGURATION
INSTALLED_APPS += (
    'debug_toolbar',
)
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
    'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_CONFIG = {
    'INTERCEPT_REDIRECTS': False,
    'SHOW_TEMPLATE_CONTEXT': True,
}
########## END TOOLBAR CONFIGURATION

########## SECRET CONFIGURATION
SECRET_KEY = get_env_setting('{{ project_name }}_SECRET_KEY')
########## END SECRET CONFIGURATION

{'fraction_non_alphanumeric': 0.15521796565389695, 'fraction_numerical': 0.0030823425803610744, 'mean_word_length': 4.61557478368356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7472059', 'n_tokens_mistral': 1511, 'n_tokens_neox': 1503, 'n_words': 300}