<commit_before>from .base import *

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

# TODO: Add querycount settings to ignore: admin, static files
QUERYCOUNT = {
    'THRESHOLDS': {
        'MEDIUM': 50,
        'HIGH': 200,
        'MIN_TIME_TO_LOG':0,
        'MIN_QUERY_COUNT_TO_LOG':0
    },
    'IGNORE_PATTERNS': [r'^/static', r'^/media', r'^/admin'],
}


INSTALLED_APPS = INSTALLED_APPS + (
    'debug_toolbar',
    'querycount',
)

# Exclude the cached.Loader from dev so we render the template each time.
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'debug': DEBUG,
            'context_processors': (
                "django.contrib.auth.context_processors.auth",
                "django.template.context_processors.debug",
                "django.template.context_processors.i18n",
                "django.template.context_processors.media",
                "django.template.context_processors.static",
                "django.template.context_processors.tz",
                "django.contrib.messages.context_processors.messages",
                "django.template.context_processors.tz",
            ),
        },
    },
]

# Media Uploads for Development
MEDIA_ROOT = "/webapps/tndata_backend/uploads/"
MEDIA_URL = "/media/"
STATIC_URL = "/static/"

# EMAIL via Mailgun.
# Details for the DEV sandbox server:
# sandbox4dc4d62d8cf24785914c55630ab480e6.mailgun.org
EMAIL_HOST = 'smtp.mailgun.org'
EMAIL_HOST_USER = '<EMAIL>@<EMAIL>'
EMAIL_HOST_PASSWORD = '<PASSWORD>a70a9988127ff7fa217f559c2d59a'
EMAIL_USE_TLS = True
EMAIL_USE_SSL = False
EMAIL_PORT = '587'  # 25, 587, 465

# django-cors-headers<commit_msg>updated local dev settings<commit_after>from .base import *

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

SITE_DOMAIN = "localhost"
SITE_URL = "http://127.0.0.1:8000"
MANAGERS = ADMINS

# TODO: Add querycount settings to ignore: admin, static files
QUERYCOUNT = {
    'THRESHOLDS': {
        'MEDIUM': 50,
        'HIGH': 200,
        'MIN_TIME_TO_LOG': 0,
        'MIN_QUERY_COUNT_TO_LOG': 0
    },
    'IGNORE_PATTERNS': [r'^/static', r'^/media', r'^/admin'],
}


INSTALLED_APPS = INSTALLED_APPS + (
    'debug_toolbar',
    'querycount',
)

# Just like production, but without the cached template loader
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
TEMPLATES[0]['OPTIONS']['loaders'] = [
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
]

# Disable AWS/S3 (for when working on js/css locally)
# ---------------------------------------------------
#STATIC_ROOT = "collected_static_files"
#STATIC_URL = "/static/"
#STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
#STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
#STATICFILES_FINDERS = (
    #"django.contrib.staticfiles.finders.FileSystemFinder",
    #"django.contrib.staticfiles.finders.AppDirectoriesFinder",
#)
#MEDIA_ROOT = "/webapps/tndata_backend/uploads/"
#MEDIA_URL = "/media/"
#DEFAULT_FILE_STORAGE = "django.core.files.storage.FileSystemStorage"


# EMAIL via Mailgun.
# Details for the DEV sandbox server:
# sandbox4dc4d62d8cf24785914c55630ab480e6.mailgun.org
EMAIL_HOST = 'smtp.mailgun.org'
EMAIL_HOST_USER = '<EMAIL>'
EMAIL_HOST_PASSWORD = '<PASSWORD>'
EMAIL_USE_TLS = True
EMAIL_USE_SSL = False
EMAIL_PORT = '587'  # 25, 587, 465

# Local email delivery
#EMAIL_HOST = 'localhost'
#EMAIL_HOST_USER = ''
#EMAIL_HOST_PASSWORD = ''
#EMAIL_USE_TLS = False
#EMAIL_PORT = 1025

# django-cors-headers
{'fraction_non_alphanumeric': 0.141970310391363, 'fraction_numerical': 0.03184885290148448, 'mean_word_length': 3.4224343675417663, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4816131', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1288, 'n_words': 237}