<commit_before>from django.contrib.auth.models import User
from django.db import models

from cyder.base.mixins import ObjectUrlMixin
from cyder.cydns.domain.models import Domain
from cyder.cydhcp.range.models import Range
from cyder.cydhcp.workgroup.models import Workgroup


class Ctnr(models.Model, ObjectUrlMixin):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=100, unique=True)
    users = models.ManyToManyField(User, null=False, related_name='users',
                                   through='CtnrUser', blank=True)
    domains = models.ManyToManyField(Domain, null=False, blank=True)
    ranges = models.ManyToManyField(Range, null=False, blank=True)
    workgroups = models.ManyToManyField(Workgroup, null=False, blank=True)
    description = models.CharField(max_length=200, blank=True)
    email_contact = models.EmailField(blank=True, null=True)

    class Meta:
        db_table = 'ctnr'

    def __str__(self):
        return self.name

    def details(self):
        return (
            ('Name', self.name),
            ('Description', self.description),
        )


class CtnrUser(models.Model):
    user = models.ForeignKey(User)
    ctnr = models.ForeignKey(Ctnr)
    level = models.IntegerField()

    class Meta:
        db_table = 'ctnr_users'
        unique_together = ('ctnr', 'user')

    def get_detail_url(self):
        return '/ctnr/%s/' % (self.ctnr.id)<commit_msg>fixed the details in the ctnr model<commit_after>from django.contrib.auth.models import User
from django.db import models

from cyder.base.mixins import ObjectUrlMixin
from cyder.cydns.domain.models import Domain
from cyder.cydhcp.range.models import Range
from cyder.cydhcp.workgroup.models import Workgroup


class Ctnr(models.Model, ObjectUrlMixin):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=100, unique=True)
    users = models.ManyToManyField(User, null=False, related_name='users',
                                   through='CtnrUser', blank=True)
    domains = models.ManyToManyField(Domain, null=False, blank=True)
    ranges = models.ManyToManyField(Range, null=False, blank=True)
    workgroups = models.ManyToManyField(Workgroup, null=False, blank=True)
    description = models.CharField(max_length=200, blank=True)
    email_contact = models.EmailField(blank=True, null=True)

    class Meta:
        db_table = 'ctnr'

    def __str__(self):
        return self.name

    def details(self):
        data = super(Ctnr, self).details()
        data['data'] = (
            ('Name', 'name', self.name),
            ('Description', 'description', self.description),
        )
        return data


class CtnrUser(models.Model):
    user = models.ForeignKey(User)
    ctnr = models.ForeignKey(Ctnr)
    level = models.IntegerField()

    class Meta:
        db_table = 'ctnr_users'
        unique_together = ('ctnr', 'user')

    def get_detail_url(self):
        return '/ctnr/%s/' % (self.ctnr.id)
{'fraction_non_alphanumeric': 0.11193029490616623, 'fraction_numerical': 0.004021447721179625, 'mean_word_length': 3.2826398852223817, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6057187', 'n_tokens_mistral': 947, 'n_tokens_neox': 912, 'n_words': 194}