<commit_before>from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db.models import permalink, get_model
from django.utils.importlib import import_module
from django.utils.translation import ugettext_lazy as _

from django_extensions.db.fields import AutoSlugField

from .base import OrganizationBase, OrganizationUserBase, OrganizationOwnerBase

USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
ORGS_TIMESTAMPED_MODEL = getattr(settings, 'ORGS_TIMESTAMPED_MODEL')


try:
    module, klass = ORGS_TIMESTAMPED_MODEL.rsplit('.', 1)
    TimeStampedModel = getattr(import_module(module), klass)
except:
    raise ImproperlyConfigured("Your TimeStampedBaseModel class, {0},"
            " is improperly defined".format(ORGS_TIMESTAMPED_MODEL))


def get_user_model():
    """
    Returns the chosen user model as a class. This functionality won't be
    builtin until Django 1.5.
    """<commit_msg>Provide a django_extensions default<commit_after>from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db.models import permalink, get_model
from django.utils.importlib import import_module
from django.utils.translation import ugettext_lazy as _

from django_extensions.db.fields import AutoSlugField

from .base import OrganizationBase, OrganizationUserBase, OrganizationOwnerBase

USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
ORGS_TIMESTAMPED_MODEL = getattr(settings, 'ORGS_TIMESTAMPED_MODEL',
        'django_extensions.db.models.TimeStampedModel')


try:
    module, klass = ORGS_TIMESTAMPED_MODEL.rsplit('.', 1)
    TimeStampedModel = getattr(import_module(module), klass)
except:
    raise ImproperlyConfigured("Your TimeStampedBaseModel class, {0},"
            " is improperly defined".format(ORGS_TIMESTAMPED_MODEL))


def get_user_model():
    """
    Returns the chosen user model as a class. This functionality won't be
    builtin until Django 1.5.
    """
{'fraction_non_alphanumeric': 0.07902439024390244, 'fraction_numerical': 0.003902439024390244, 'mean_word_length': 5.409375, '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': '6577113', 'n_tokens_mistral': 633, 'n_tokens_neox': 612, 'n_words': 160}