<commit_before>#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import importlib

from django.conf import settings


def setup():
    # Look for Metadata subclasses in appname/seo.py files
    for app in settings.INSTALLED_APPS:
        try:
            module_name = '%s.seo' % str(app)
            importlib.import_module(module_name)
        except ImportError:
            pass

    # if SEO_MODELS is defined, create a default Metadata class
    if hasattr(settings, 'SEO_MODELS'):
        importlib.import_module('rollyourown.seo.default')

    from rollyourown.seo.base import register_signals
    register_signals()<commit_msg>Fix loading default<commit_after>#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import importlib

from django.conf import settings


def setup():
    is_loaded = False
    # Look for Metadata subclasses in appname/seo.py files
    for app in settings.INSTALLED_APPS:
        try:
            module_name = '%s.seo' % str(app)
            importlib.import_module(module_name)
            is_loaded = True
        except ImportError:
            pass

    # if SEO_MODELS is defined, create a default Metadata class
    if hasattr(settings, 'SEO_MODELS') and not is_loaded:
        importlib.import_module('rollyourown.seo.default')

    from rollyourown.seo.base import register_signals
    register_signals()
{'fraction_non_alphanumeric': 0.08799403430275914, 'fraction_numerical': 0.0014914243102162564, 'mean_word_length': 2.769662921348315, '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': '7188857', 'n_tokens_mistral': 421, 'n_tokens_neox': 408, 'n_words': 106}