<commit_before>import os
BASE_DIR = os.path.dirname(__file__)

SECRET_KEY = '!!! change me in localsettings.py !!!'

DEBUG = False
TEMPLATE_DEBUG = DEBUG

# you should set this in localsettings.py
ALLOWED_HOSTS = ['*']

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_jinja',
    'cidonkey'
)

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',
)

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',
    'cidonkey.views.cid_context',
    'django.contrib.messages.context_processors.messages',
)

ROOT_URLCONF = 'urls'

WSGI_APPLICATION = 'wsgi.application'

# override the DATABASE in localsettings.py to use something more powerful
DATABASES = {'default': {
    'ENGINE': 'django.db.backends.sqlite3',
    'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}}

LANGUAGE_CODE = 'en-gb'

TIME_ZONE = 'UTC'
USE_I18N = False
USE_L10N = False
USE_TZ = True

STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'

# whether or not to use amazon s3 for storing zipped backups (media files)
USE_S3 = False

if USE_S3:
    DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
    AWS_QUERYSTRING_AUTH = True
    AWS_S3_SECURE_URLS = True
    AWS_DEFAULT_ACL = 'private'
    AWS_QUERYSTRING_EXPIRE = 600
    # You need to enter the following in localsettings.py or via enviroment variables
    # (or here, but make sure not to commit them to any public vc server!)
    #     AWS_ACCESS_KEY_ID = 'aws s3 key id'
    #     AWS_SECRET_ACCESS_KEY = 'aws s3 access key'
    #     AWS_STORAGE_BUCKET_NAME = 'bucket name'
    #     MEDIA_URL = 'https://... s3 url'
else:
    MEDIA_ROOT = 'mediafiles'
    MEDIA_URL = '/media/'

TEMPLATE_LOADERS = (
    'django_jinja.loaders.FileSystemLoader',
    'django_jinja.loaders.AppLoader'
)

DEFAULT_JINJA2_TEMPLATE_EXTENSION = '.jinja'

JINJA2_ENVIRONMENT_OPTIONS = {
    'trim_blocks': True,
}

LOGIN_REDIRECT_URL = '/'<commit_msg>improve s3 instructions<commit_after>import os
BASE_DIR = os.path.dirname(__file__)

SECRET_KEY = '!!! change me in localsettings.py !!!'

DEBUG = False
TEMPLATE_DEBUG = DEBUG

# you should set this in localsettings.py
ALLOWED_HOSTS = ['*']

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_jinja',
    'cidonkey'
)

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',
)

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',
    'cidonkey.views.cid_context',
    'django.contrib.messages.context_processors.messages',
)

ROOT_URLCONF = 'urls'

WSGI_APPLICATION = 'wsgi.application'

# override the DATABASE in localsettings.py to use something more powerful
DATABASES = {'default': {
    'ENGINE': 'django.db.backends.sqlite3',
    'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}}

LANGUAGE_CODE = 'en-gb'

TIME_ZONE = 'UTC'
USE_I18N = False
USE_L10N = False
USE_TZ = True

STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'

# # To enable S3 put the following code in localsettings.py:
# DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
# AWS_QUERYSTRING_AUTH = True
# AWS_S3_SECURE_URLS = True
# AWS_DEFAULT_ACL = 'private'
# AWS_QUERYSTRING_EXPIRE = 600
# # The following is sensitive, make sure you don't inadvertently commit it to public VC!
# AWS_ACCESS_KEY_ID = 'aws s3 key id'
# AWS_SECRET_ACCESS_KEY = 'aws s3 access key'
# AWS_STORAGE_BUCKET_NAME = 'bucket name'
# MEDIA_URL = 'https://... s3 url'

MEDIA_ROOT = 'mediafiles'
MEDIA_URL = '/media/'

TEMPLATE_LOADERS = (
    'django_jinja.loaders.FileSystemLoader',
    'django_jinja.loaders.AppLoader'
)

DEFAULT_JINJA2_TEMPLATE_EXTENSION = '.jinja'

JINJA2_ENVIRONMENT_OPTIONS = {
    'trim_blocks': True,
}

LOGIN_REDIRECT_URL = '/'
{'fraction_non_alphanumeric': 0.11811328049487725, 'fraction_numerical': 0.008312391262323603, 'mean_word_length': 4.4520547945205475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5162008', 'n_tokens_mistral': 1872, 'n_tokens_neox': 1849, 'n_words': 311}