<commit_before># -*- coding: utf-8 -*-
import os
import sys

from configurations import values

from .base import Base as Settings


class Development(Settings):
    # Installed Applications.
    # ------------------------------------------------------------------
    INSTALLED_APPS = Settings.INSTALLED_APPS + [
        'debugtools',
        'django_extensions',
    ]

    # Site Configuration.
    # ------------------------------------------------------------------
    ALLOWED_HOSTS = ['*']

    # Debug Settings.
    # ------------------------------------------------------------------
    DEBUG = values.BooleanValue(True)

    # Authentication Configuration.
    # ------------------------------------------------------------------
    MEISHI_ENDPOINT = 'https://localhost:8443/api/'
    OAUTH_AUTHORIZATION_URL = 'https://localhost:8443/authorize/'
    OAUTH_TOKEN_URL = 'https://localhost:8443/token/'
    OAUTH_REDIRECT_URL = 'https://localhost:8444/accounts/authenticated/'

    # django-debugtoolbar.
    # ------------------------------------------------------------------
    INSTALLED_APPS += ['debug_toolbar',]
    INTERNAL_IPS = ('127.0.0.1',)
    MIDDLEWARE_CLASSES = Settings.MIDDLEWARE_CLASSES + ('debug_toolbar.middleware.DebugToolbarMiddleware',)
    DEBUG_TOOLBAR_CONFIG = {
        'INTERCEPT_REDIRECTS': False,
        'SHOW_TEMPLATE_CONTEXT': True,
    }

    # django-devserver.
    # ------------------------------------------------------------------
    INSTALLED_APPS += ['devserver',]
    DEVSERVER_MODULES = (
        'devserver.modules.sql.SQLSummaryModule',
        'devserver.modules.profile.ProfileSummaryModule',
        'devserver.modules.ajax.AjaxDumpModule',
        'devserver.modules.cache.CacheSummaryModule',
    )

    # django-haystack.
    # ------------------------------------------------------------------
    HAYSTACK_CONNECTIONS = {
        'default': {
            'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
            'URL': 'http://127.0.0.1:9200/',
            'INDEX_NAME': 'haystack',
        },
    }<commit_msg>Use the BuildOnRequest middleware to keep development pretty.<commit_after># -*- coding: utf-8 -*-
import os
import sys

from configurations import values

from .base import Base as Settings


class Development(Settings):
    # Installed Applications.
    # ------------------------------------------------------------------
    INSTALLED_APPS = Settings.INSTALLED_APPS + [
        'debugtools',
        'django_extensions',
    ]

    # Site Configuration.
    # ------------------------------------------------------------------
    ALLOWED_HOSTS = ['*']

    # Debug Settings.
    # ------------------------------------------------------------------
    DEBUG = values.BooleanValue(True)

    # Authentication Configuration.
    # ------------------------------------------------------------------
    MEISHI_ENDPOINT = 'https://localhost:8443/api/'
    OAUTH_AUTHORIZATION_URL = 'https://localhost:8443/authorize/'
    OAUTH_TOKEN_URL = 'https://localhost:8443/token/'
    OAUTH_REDIRECT_URL = 'https://localhost:8444/accounts/authenticated/'

    # django-debugtoolbar.
    # ------------------------------------------------------------------
    INSTALLED_APPS += ['debug_toolbar',]
    INTERNAL_IPS = ('127.0.0.1',)
    MIDDLEWARE_CLASSES = Settings.MIDDLEWARE_CLASSES + ('debug_toolbar.middleware.DebugToolbarMiddleware',)
    DEBUG_TOOLBAR_CONFIG = {
        'INTERCEPT_REDIRECTS': False,
        'SHOW_TEMPLATE_CONTEXT': True,
    }

    # django-devserver.
    # ------------------------------------------------------------------
    INSTALLED_APPS += ['devserver',]
    DEVSERVER_MODULES = (
        'devserver.modules.sql.SQLSummaryModule',
        'devserver.modules.profile.ProfileSummaryModule',
        'devserver.modules.ajax.AjaxDumpModule',
        'devserver.modules.cache.CacheSummaryModule',
    )

    # django-ecstatic / django-staticbuilder
    # ------------------------------------------------------------------
    MIDDLEWARE_CLASSES += ('staticbuilder.middleware.BuildOnRequest',)

    # django-haystack.
    # ------------------------------------------------------------------
    HAYSTACK_CONNECTIONS = {
        'default': {
            'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
            'URL': 'http://127.0.0.1:9200/',
            'INDEX_NAME': 'haystack',
        },
    }
{'fraction_non_alphanumeric': 0.3183041722745626, 'fraction_numerical': 0.014804845222072678, 'mean_word_length': 1.3468421052631578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2239609', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1124, 'n_words': 155}