<commit_before>"""
Django settings for builderdb project.

For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '<KEY>'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []

# Markup Field
# https://github.com/jamesturk/django-markupfield

import markdown
MARKUP_FIELD_TYPES = (
    ('markdown', markdown.markdown),
)

# Application definition

INSTALLED_APPS = (
    'django.contrib.contenttypes',
    'autocomplete_light',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'django.contrib.humanize',

    'foundation',
    'crispy_forms',
    'crispy_forms_foundation',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'easy_thumbnails',
    'avatar',
    'sitetree',

    'builders',
    'accounts',
)

# Template Context Processors
# https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors

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.tz',
    'django.contrib.messages.context_processors.messages',
    'allauth.account.context_processors.account',
    'allauth.socialaccount.context_processors.socialaccount',
    'django.core.context_processors.request',
)

# Template Directories
# https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
TEMPLATE_DIRS = (
    os.path.join(BASE_DIR, 'builderdb', 'templates'),
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'builderdb.urls'

WSGI_APPLICATION = 'builderdb.wsgi.application'

# Crispy Forms

CRISPY_TEMPLATE_PACK = 'foundation-5'
CRISPY_FAIL_SILENTLY = not DEBUG

# Sites
# https://docs.djangoproject.com/en/dev/ref/contrib/sites/

SITE_ID = 1

# Email
# https://github.com/perenecabuto/django-sendmail-backend

EMAIL_BACKEND = 'django_sendmail_backend.backends.EmailBackend'

# Authentication

ANONYMOUS_USER_ID = -1

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'allauth.account.auth_backends.AuthenticationBackend',
)

# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/dev/howto/static-files/

STATIC_URL = '/static/'

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

# Easy Thumbnails
# https://github.com/SmileyChris/easy-thumbnails

THUMBNAIL_ALIASES = {
    'builders.Builder.thumb': {
        'square': {'size': (220, 220), 'crop': 'smart', 'upscale': True},
    },

    'builders.Builder.banner': {
        'large': {'size': (970, 194), 'crop': 'smart', 'upscale': True},
    },

    'builders.Photo.image': {
        'thumb': {'size': (125, 125), 'crop': 'smart', 'upscale': True},
        'thumb_portait': {'size': (150, 300), 'crop': 'smart', 'upscale': True},
    }
}

try:
    from .local_settings import *
except ImportError:
    pass

if DEBUG:
    INSTALLED_APPS = tuple(list(INSTALLED_APPS)+['debug_toolbar'])<commit_msg>try a crazy way to do local settings variables<commit_after>"""
Django settings for builderdb project.

For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '<KEY>'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []

# Markup Field
# https://github.com/jamesturk/django-markupfield

import markdown
MARKUP_FIELD_TYPES = (
    ('markdown', markdown.markdown),
)

# Application definition

INSTALLED_APPS = (
    'django.contrib.contenttypes',
    'autocomplete_light',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'django.contrib.humanize',

    'foundation',
    'crispy_forms',
    'crispy_forms_foundation',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'easy_thumbnails',
    'avatar',
    'sitetree',

    'builders',
    'accounts',
)

# Template Context Processors
# https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors

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.tz',
    'django.contrib.messages.context_processors.messages',
    'allauth.account.context_processors.account',
    'allauth.socialaccount.context_processors.socialaccount',
    'django.core.context_processors.request',
)

# Template Directories
# https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
TEMPLATE_DIRS = (
    os.path.join(BASE_DIR, 'builderdb', 'templates'),
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'builderdb.urls'

WSGI_APPLICATION = 'builderdb.wsgi.application'

# Crispy Forms

CRISPY_TEMPLATE_PACK = 'foundation-5'
CRISPY_FAIL_SILENTLY = not DEBUG

# Sites
# https://docs.djangoproject.com/en/dev/ref/contrib/sites/

SITE_ID = 1

# Email
# https://github.com/perenecabuto/django-sendmail-backend

EMAIL_BACKEND = 'django_sendmail_backend.backends.EmailBackend'

# Authentication

ANONYMOUS_USER_ID = -1

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'allauth.account.auth_backends.AuthenticationBackend',
)

# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/dev/howto/static-files/

STATIC_URL = '/static/'

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

# Easy Thumbnails
# https://github.com/SmileyChris/easy-thumbnails

THUMBNAIL_ALIASES = {
    'builders.Builder.thumb': {
        'square': {'size': (220, 220), 'crop': 'smart', 'upscale': True},
    },

    'builders.Builder.banner': {
        'large': {'size': (970, 194), 'crop': 'smart', 'upscale': True},
    },

    'builders.Photo.image': {
        'thumb': {'size': (125, 125), 'crop': 'smart', 'upscale': True},
        'thumb_portait': {'size': (150, 300), 'crop': 'smart', 'upscale': True},
    }
}

try:
    from .local_settings import local_settings
    local_settings(globals())
except ImportError:
    pass

if DEBUG:
    INSTALLED_APPS = tuple(list(INSTALLED_APPS)+['debug_toolbar'])
{'fraction_non_alphanumeric': 0.14189487632508835, 'fraction_numerical': 0.008171378091872792, 'mean_word_length': 4.229214780600462, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 24, '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': '3787751', 'n_tokens_mistral': 3262, 'n_tokens_neox': 3135, 'n_words': 493}