<commit_before>import os


WSGI_APPLICATION = 'openbudgets.wsgi.application'

SECRET_KEY = '<KEY>'

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ALLOWED_HOSTS = ['.openbudgets.dev:8000']
SESSION_COOKIE_DOMAIN = 'openbudgets.dev'

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

SITE_ID = 1
ROOT_URLCONF = 'openbudgets.urls'
SUBDOMAIN_URLCONFS = {
    None: ROOT_URLCONF,
    'www': ROOT_URLCONF,
    'he': ROOT_URLCONF,
    'en': ROOT_URLCONF,
    'ru': ROOT_URLCONF,
    'ar': ROOT_URLCONF,
}

gettext = lambda s: s
LANGUAGES = (
    ('he', gettext('Hebrew')),
    ('en', gettext('English')),
    ('ar', gettext('Arabic')),
    ('ru', gettext('Russian')),
)
LANGUAGE_CODE = LANGUAGES[0][0]

STATIC_URL = '/static/'
MEDIA_URL = '/static/media/'

SETTINGS_ROOT = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.abspath(os.path.dirname(SETTINGS_ROOT))
REPOSITORY_ROOT = os.path.abspath(os.path.dirname(PROJECT_ROOT))
STATIC_ROOT = os.path.abspath(os.path.join(REPOSITORY_ROOT, 'static'),)
MEDIA_ROOT = os.path.abspath(os.path.join(STATIC_ROOT, 'media'),)
LOCALE_PATHS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'locale')),)
STATICFILES_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'commons', 'static')),)
FIXTURE_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'fixtures')),)
TEMPLATE_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'commons', 'templates')),)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

TEMPLATE_LOADERS = (
    'openbudgets.commons.stache.PystacheFilesystemLoader',
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.cache.UpdateCacheMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'subdomains.middleware.SubdomainURLRoutingMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'openbudgets.apps.international.middleware.InterfaceLanguage',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.cache.FetchFromCacheMiddleware',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.comments',
    'django.contrib.admin',
    'django.contrib.sitemaps',
    'cacheops',
    'corsheaders',
    'django_gravatar',
    'oauth2_provider',
    'raven.contrib.django.raven_compat',
    'registration',
    'rest_framework',
    'south',
    'subdomains',
    'taggit',
    'openbudgets.apps.accounts',
    'openbudgets.apps.sheets',
    'openbudgets.apps.contexts',
    'openbudgets.apps.entities',
    'openbudgets.apps.interactions',
    'openbudgets.apps.international',
    'openbudgets.apps.pages',
    'openbudgets.apps.sources',
    'openbudgets.apps.taxonomies',
    'openbudgets.apps.tools',
    'openbudgets.apps.transport',
    'openbudgets.api',
    'openbudgets.ui',
    'openbudgets.commons',
)

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',
    'django.core.context_processors.request',
    'openbudgets.commons.context_processors.forms',
    'openbudgets.commons.context_processors.openbudgets',
    'openbudgets.commons.context_processors.site',
)

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse'
        }
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        },
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        },
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
        'django.db.backends': {
            'handlers': ['console'],
            'level': 'DEBUG',
        },
    },
}

AUTOSLUG_SLUGIFY_FUNCTION = 'slugify.slugify'

SOUTH_TESTS_MIGRATE = False
SOUTH_MIGRATION_MODULES = {'taggit': 'taggit.south_migrations'}

RAVEN_CONFIG = {'dsn': ''}

ACCOUNT_ACTIVATION_DAYS = 7
AUTH_USER_MODEL = 'accounts.Account'
LOGIN_URL = '/accounts/login/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_URL = '/accounts/auth/logout/'
ABSOLUTE_URL_OVERRIDES = {'auth.user': lambda u: '/accounts/{uuid}/'.format(uuid=u.uuid)}
GRAVATAR_DEFAULT_IMAGE = 'retro'

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'oauth2_provider.ext.rest_framework.OAuth2Authentication',
        #'rest_framework.authentication.SessionAuthentication',
    ),
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.AllowAny',
        #'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework.renderers.UnicodeJSONRenderer',
        #'rest_framework.renderers.BrowsableAPIRenderer',
    ),
    'DEFAULT_FILTER_BACKENDS': (
        'rest_framework.filters.SearchFilter',
        'rest_framework.filters.OrderingFilter',
    ),
    'PAGINATE_BY': 1000,
    'PAGINATE_BY_PARAM': 'page_by'
}

OAUTH2_PROVIDER = {'SCOPES': ['read', 'write']}
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_METHODS = ('GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS')
CORS_ALLOW_HEADERS = (
    'x-requested-with',
    'content-type',
    'accept',
    'origin',
    'authorization',
    'x-csrftoken'
)

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''

ADMINS = (('', ''),)<commit_msg>500 is enough for default objects per page.<commit_after>import os


WSGI_APPLICATION = 'openbudgets.wsgi.application'

SECRET_KEY = '<KEY>'

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ALLOWED_HOSTS = ['.openbudgets.dev:8000']
SESSION_COOKIE_DOMAIN = 'openbudgets.dev'

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

SITE_ID = 1
ROOT_URLCONF = 'openbudgets.urls'
SUBDOMAIN_URLCONFS = {
    None: ROOT_URLCONF,
    'www': ROOT_URLCONF,
    'he': ROOT_URLCONF,
    'en': ROOT_URLCONF,
    'ru': ROOT_URLCONF,
    'ar': ROOT_URLCONF,
}

gettext = lambda s: s
LANGUAGES = (
    ('he', gettext('Hebrew')),
    ('en', gettext('English')),
    ('ar', gettext('Arabic')),
    ('ru', gettext('Russian')),
)
LANGUAGE_CODE = LANGUAGES[0][0]

STATIC_URL = '/static/'
MEDIA_URL = '/static/media/'

SETTINGS_ROOT = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.abspath(os.path.dirname(SETTINGS_ROOT))
REPOSITORY_ROOT = os.path.abspath(os.path.dirname(PROJECT_ROOT))
STATIC_ROOT = os.path.abspath(os.path.join(REPOSITORY_ROOT, 'static'),)
MEDIA_ROOT = os.path.abspath(os.path.join(STATIC_ROOT, 'media'),)
LOCALE_PATHS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'locale')),)
STATICFILES_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'commons', 'static')),)
FIXTURE_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'fixtures')),)
TEMPLATE_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'commons', 'templates')),)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

TEMPLATE_LOADERS = (
    'openbudgets.commons.stache.PystacheFilesystemLoader',
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.cache.UpdateCacheMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'subdomains.middleware.SubdomainURLRoutingMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'openbudgets.apps.international.middleware.InterfaceLanguage',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.cache.FetchFromCacheMiddleware',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.comments',
    'django.contrib.admin',
    'django.contrib.sitemaps',
    'cacheops',
    'corsheaders',
    'django_gravatar',
    'oauth2_provider',
    'raven.contrib.django.raven_compat',
    'registration',
    'rest_framework',
    'south',
    'subdomains',
    'taggit',
    'openbudgets.apps.accounts',
    'openbudgets.apps.sheets',
    'openbudgets.apps.contexts',
    'openbudgets.apps.entities',
    'openbudgets.apps.interactions',
    'openbudgets.apps.international',
    'openbudgets.apps.pages',
    'openbudgets.apps.sources',
    'openbudgets.apps.taxonomies',
    'openbudgets.apps.tools',
    'openbudgets.apps.transport',
    'openbudgets.api',
    'openbudgets.ui',
    'openbudgets.commons',
)

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',
    'django.core.context_processors.request',
    'openbudgets.commons.context_processors.forms',
    'openbudgets.commons.context_processors.openbudgets',
    'openbudgets.commons.context_processors.site',
)

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse'
        }
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        },
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        },
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
        'django.db.backends': {
            'handlers': ['console'],
            'level': 'DEBUG',
        },
    },
}

AUTOSLUG_SLUGIFY_FUNCTION = 'slugify.slugify'

SOUTH_TESTS_MIGRATE = False
SOUTH_MIGRATION_MODULES = {'taggit': 'taggit.south_migrations'}

RAVEN_CONFIG = {'dsn': ''}

ACCOUNT_ACTIVATION_DAYS = 7
AUTH_USER_MODEL = 'accounts.Account'
LOGIN_URL = '/accounts/login/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_URL = '/accounts/auth/logout/'
ABSOLUTE_URL_OVERRIDES = {'auth.user': lambda u: '/accounts/{uuid}/'.format(uuid=u.uuid)}
GRAVATAR_DEFAULT_IMAGE = 'retro'

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'oauth2_provider.ext.rest_framework.OAuth2Authentication',
        #'rest_framework.authentication.SessionAuthentication',
    ),
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.AllowAny',
        #'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework.renderers.UnicodeJSONRenderer',
        #'rest_framework.renderers.BrowsableAPIRenderer',
    ),
    'DEFAULT_FILTER_BACKENDS': (
        'rest_framework.filters.SearchFilter',
        'rest_framework.filters.OrderingFilter',
    ),
    'PAGINATE_BY': 500,
    'PAGINATE_BY_PARAM': 'page_by'
}

OAUTH2_PROVIDER = {'SCOPES': ['read', 'write']}
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_METHODS = ('GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS')
CORS_ALLOW_HEADERS = (
    'x-requested-with',
    'content-type',
    'accept',
    'origin',
    'authorization',
    'x-csrftoken'
)

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''

ADMINS = (('', ''),)
{'fraction_non_alphanumeric': 0.14979821160085463, 'fraction_numerical': 0.004273166099548944, 'mean_word_length': 3.938647909339586, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5809602', 'n_tokens_mistral': 4583, 'n_tokens_neox': 4510, 'n_words': 517}