<commit_before>"""
Test models used in django-moderations tests
"""
from django.db import models
from django.contrib.auth.models import User


class UserProfile(models.Model):
    user = models.ForeignKey(User, related_name='user_profile_set')
    description = models.TextField()
    url = models.URLField()

    def __unicode__(self):
        return "%s - %s" % (self.user, self.url)


class ModelWithSlugField(models.Model):
    slug = models.SlugField(unique=True)


class ModelWithSlugField2(models.Model):
    slug = models.SlugField(unique=True)<commit_msg>Added test models for register model class with multiple managers<commit_after>"""
Test models used in django-moderations tests
"""
from django.db import models
from django.contrib.auth.models import User
from django.db.models.manager import Manager


class UserProfile(models.Model):
    user = models.ForeignKey(User, related_name='user_profile_set')
    description = models.TextField()
    url = models.URLField()

    def __unicode__(self):
        return "%s - %s" % (self.user, self.url)


class ModelWithSlugField(models.Model):
    slug = models.SlugField(unique=True)


class ModelWithSlugField2(models.Model):
    slug = models.SlugField(unique=True)


class MenMenager(Manager):
    
    def get_query_set(self):
        query_set = super(MenMenager, self).get_query_set()
        return query_set.filter(gender=1)


class WomenMenager(Manager):
    
    def get_query_set(self):
        query_set = super(WomenMenager, self).get_query_set()
        return query_set.filter(gender=0)


class ModelWithMultipleManagers(models.Model):
    gender = models.SmallIntegerField()
    objects = Manager()
    men = MenMenager()
    women = WomenMenager()
{'fraction_non_alphanumeric': 0.10801393728222997, 'fraction_numerical': 0.0023228803716608595, 'mean_word_length': 4.205438066465256, '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': '1675568', 'n_tokens_mistral': 534, 'n_tokens_neox': 518, 'n_words': 118}