<commit_before># Django
import os
from django.apps import AppConfig


class ApiConfig(AppConfig):
    """Sets the configuration for the api app."""

    name = 'api'

    def ready(self):
        # if os.environ['DJANGO_SETTINGS_MODULE'] != 'settings.base':
        #     from .signals import (
        #         user_pre_delete,
        #     )
        #     import algoliasearch_django as algoliasearch
        #     from .indexes import ChartIndex
        #     Chart = self.get_model('chart')
        #     algoliasearch.register(Chart, ChartIndex)
        return
<commit_msg>Turn on auto-indexing signal<commit_after># Django
import os
from django.apps import AppConfig


class ApiConfig(AppConfig):
    """Sets the configuration for the api app."""

    name = 'api'

    def ready(self):
        if os.environ['DJANGO_SETTINGS_MODULE'] != 'settings.base':
            from .signals import (
                user_pre_delete,
            )
            import algoliasearch_django as algoliasearch
            from .indexes import ChartIndex
            Chart = self.get_model('chart')
            algoliasearch.register(Chart, ChartIndex)
        return

{'fraction_non_alphanumeric': 0.08886971527178603, 'fraction_numerical': 0.0, 'mean_word_length': 2.2132963988919667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7281370', 'n_tokens_mistral': 331, 'n_tokens_neox': 325, 'n_words': 85}