<commit_before>from django.db import models
from django.contrib.contenttypes import generic


class JoinRequest(models.Model):
    PENDING = 0
    ACCEPTED = 1
    REJECTED = 2

    STATE_CHOICES = ((PENDING, "Pending"),
                     (ACCEPTED, "Accepted"),
                     (REJECTED, "Rejected"),)

    content_type = models.ForeignKey("contenttypes.ContentType")
    object_id = models.PositiveIntegerField()
    realm = generic.GenericForeignKey()

    user = models.ForeignKey("auth.User")
    message = models.TextField(blank=True)
    state = models.IntegerField(choices=STATE_CHOICES, default=PENDING)

    host_user = models.ForeignKey("auth.User", null=True)
    host_message = models.TextField(blank=True)
    host_state = models.IntegerField(choices=STATE_CHOICES, default=PENDING)

    created = models.DateTimeField(auto_now_add=True)
    updated = models.DateTimeField(auto_now=True)
<commit_msg>Fields realm and host_user are now blankable and nullable.<commit_after>from django.db import models
from django.contrib.contenttypes import generic


class JoinRequest(models.Model):
    PENDING = 0
    ACCEPTED = 1
    REJECTED = 2

    STATE_CHOICES = ((PENDING, "Pending"),
                     (ACCEPTED, "Accepted"),
                     (REJECTED, "Rejected"),)

    content_type = models.ForeignKey("contenttypes.ContentType",
                                     null=True, blank=True)
    object_id = models.PositiveIntegerField(null=True, blank=True)
    realm = generic.GenericForeignKey()

    user = models.ForeignKey("auth.User")
    message = models.TextField(blank=True)
    state = models.IntegerField(choices=STATE_CHOICES, default=PENDING)

    host_user = models.ForeignKey("auth.User", null=True, blank=True)
    host_message = models.TextField(blank=True)
    host_state = models.IntegerField(choices=STATE_CHOICES, default=PENDING)

    created = models.DateTimeField(auto_now_add=True)
    updated = models.DateTimeField(auto_now=True)

{'fraction_non_alphanumeric': 0.10483870967741936, 'fraction_numerical': 0.0030241935483870967, 'mean_word_length': 3.605568445475638, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4701733', 'n_tokens_mistral': 607, 'n_tokens_neox': 581, 'n_words': 108}