<commit_before>from django.db import models
from django.db.models import Q
from django.db.models.loading import get_model

from cyder.base.eav.constants import ATTRIBUTE_INVENTORY
from cyder.base.eav.fields import EAVAttributeField
from cyder.base.eav.models import Attribute, EAVBase
from cyder.base.mixins import ObjectUrlMixin
from cyder.base.models import BaseModel
from cyder.base.utils import transaction_atomic
from cyder.core.system.validators import validate_no_spaces


class System(BaseModel, ObjectUrlMixin):
    name = models.CharField(
        max_length=255, unique=False, null=False, blank=False,
        validators=[validate_no_spaces])

    search_fields = ('name',)
    sort_fields = ('name',)

    def __unicode__(self):<commit_msg>add ctnr field to systems<commit_after>from django.db import models
from django.db.models import Q
from django.db.models.loading import get_model

from cyder.base.eav.constants import ATTRIBUTE_INVENTORY
from cyder.base.eav.fields import EAVAttributeField
from cyder.base.eav.models import Attribute, EAVBase
from cyder.base.mixins import ObjectUrlMixin
from cyder.base.models import BaseModel
from cyder.base.utils import transaction_atomic
from cyder.core.system.validators import validate_no_spaces


class System(BaseModel, ObjectUrlMixin):
    name = models.CharField(
        max_length=255, unique=False, null=False, blank=False,
        validators=[validate_no_spaces])
    ctnr = models.ForeignKey("cyder.Ctnr", null=False,
                             verbose_name="Container")

    search_fields = ('name',)
    sort_fields = ('name',)

    def __unicode__(self):
{'fraction_non_alphanumeric': 0.08425584255842558, 'fraction_numerical': 0.0036900369003690036, 'mean_word_length': 4.668989547038327, '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': '6171589', 'n_tokens_mistral': 507, 'n_tokens_neox': 487, 'n_words': 121}