<commit_before>"""Common settings and globals."""
from os.path import abspath, basename, dirname, join, normpath


DJANGO_ROOT = dirname(dirname(abspath(__file__)))
PROJ_ROOT = join(DJANGO_ROOT, "replayswithfriends")
SITE_ROOT = dirname(DJANGO_ROOT)

SITE_NAME = basename(DJANGO_ROOT)

DEBUG = False
PROD = False
TEMPLATE_DEBUG = DEBUG


ADMINS = (
    ('<NAME>', '<EMAIL>'),
)
MANAGERS = ADMINS


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'replayswithfriends',
    }
}
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    }
}


TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en-us'

SITE_ID = 1

USE_I18N = True
USE_L10N = True


MEDIA_ROOT = normpath(join(PROJ_ROOT, 'packaged', 'media'))
MEDIA_URL = '/media/'
STATIC_ROOT = normpath(join(PROJ_ROOT, 'packaged', 'static'))
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
COMPRESS_ROOT = STATIC_ROOT
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
COMPRESS_URL = STATIC_URL
COMPRESS_PARSER = 'compressor.parser.LxmlParser'
COMPRESS_PRECOMPILERS = [
    ('text/less', 'lessc {infile} {outfile}'),
]

STATICFILES_DIRS = [
    normpath(join(DJANGO_ROOT, 'static')),
]
STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'compressor.finders.CompressorFinder',
]


SECRET_KEY = r"<KEY>a@g!@z6xtujb@hl"


FIXTURE_DIRS = [
    normpath(join(DJANGO_ROOT, 'fixtures')),
]

TEMPLATE_CONTEXT_PROCESSORS = [
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
    'django.core.context_processors.static',
    'django.core.context_processors.request',
    'django.contrib.messages.context_processors.messages'
]


TEMPLATE_LOADERS = [
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
]


TEMPLATE_DIRS = [
    normpath(join(DJANGO_ROOT, 'templates')),
]



MIDDLEWARE_CLASSES = [
    #'htmlmin.middleware.HtmlMinifyMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'pagination.middleware.PaginationMiddleware',
]

ROOT_URLCONF = '%s.urls' % SITE_NAME


INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admin',
    'django.contrib.admindocs',

    'compressor',
    'djcelery',
    'friendship',
    'gunicorn',
    'south',
    'pagination',

    'replayswithfriends.profiles',
    'replayswithfriends.sc2match',
]


LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'root': {
        'level': 'WARNING',
        'handlers': ['console'],
    },
    'formatters': {
        'verbose': {
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
        },
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'verbose'
        }
    },<commit_msg>add registration to installed apps<commit_after>"""Common settings and globals."""
from os.path import abspath, basename, dirname, join, normpath


DJANGO_ROOT = dirname(dirname(abspath(__file__)))
PROJ_ROOT = join(DJANGO_ROOT, "replayswithfriends")
SITE_ROOT = dirname(DJANGO_ROOT)

SITE_NAME = basename(DJANGO_ROOT)

DEBUG = False
PROD = False
TEMPLATE_DEBUG = DEBUG


ADMINS = (
    ('<NAME>', '<EMAIL>'),
)
MANAGERS = ADMINS


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'replayswithfriends',
    }
}
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    }
}


TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en-us'

SITE_ID = 1

USE_I18N = True
USE_L10N = True


MEDIA_ROOT = normpath(join(PROJ_ROOT, 'packaged', 'media'))
MEDIA_URL = '/media/'
STATIC_ROOT = normpath(join(PROJ_ROOT, 'packaged', 'static'))
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
COMPRESS_ROOT = STATIC_ROOT
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
COMPRESS_URL = STATIC_URL
COMPRESS_PARSER = 'compressor.parser.LxmlParser'
COMPRESS_PRECOMPILERS = [
    ('text/less', 'lessc {infile} {outfile}'),
]

STATICFILES_DIRS = [
    normpath(join(DJANGO_ROOT, 'static')),
]
STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'compressor.finders.CompressorFinder',
]


SECRET_KEY = r"<KEY>"


FIXTURE_DIRS = [
    normpath(join(DJANGO_ROOT, 'fixtures')),
]

TEMPLATE_CONTEXT_PROCESSORS = [
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
    'django.core.context_processors.static',
    'django.core.context_processors.request',
    'django.contrib.messages.context_processors.messages'
]


TEMPLATE_LOADERS = [
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
]


TEMPLATE_DIRS = [
    normpath(join(DJANGO_ROOT, 'templates')),
]



MIDDLEWARE_CLASSES = [
    #'htmlmin.middleware.HtmlMinifyMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'pagination.middleware.PaginationMiddleware',
]

ROOT_URLCONF = '%s.urls' % SITE_NAME


INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admin',
    'django.contrib.admindocs',

    'compressor',
    'djcelery',
    'friendship',
    'gunicorn',
    'south',
    'pagination',
    'registration',

    'replayswithfriends.profiles',
    'replayswithfriends.sc2match',
]


LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'root': {
        'level': 'WARNING',
        'handlers': ['console'],
    },
    'formatters': {
        'verbose': {
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
        },
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'verbose'
        }
    },
{'fraction_non_alphanumeric': 0.14707577067127628, 'fraction_numerical': 0.003025064822817632, 'mean_word_length': 3.88943661971831, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3853301', 'n_tokens_mistral': 2550, 'n_tokens_neox': 2483, 'n_words': 329}