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

from .managers import WellManager


class Well(models.Model):
    title = models.SlugField()
    pub_date = models.DateTimeField()
    expires = models.DateTimeField(null=True)
    active = models.BooleanField(default=True)

    objects = WellManager()

    def __unicode__(self):
        return "%s (%s)" % (self.title, self.pub_date)

    def save(self, *args, **kwargs):
        if not self.pub_date:
            self.pub_date = datetime.datetime.now()
        return super(Well, self).save(*args, **kwargs)


class Node(models.Model):
    well = models.ForeignKey(Well, related_name="nodes")
    order = models.IntegerField(default=0)
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey('content_type', 'object_id')

    class Meta:
        ordering = ["order"]

    def __unicode__(self):
        return "%s (%d): %s" % (self.well.title, self.order,
                                self.content_object)<commit_msg>change to be a basic text string<commit_after>import datetime
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType

from .managers import WellManager


class Well(models.Model):
    title = models.CharField(max_length=100)
    pub_date = models.DateTimeField()
    expires = models.DateTimeField(null=True)
    active = models.BooleanField(default=True)

    objects = WellManager()

    def __unicode__(self):
        return "%s (%s)" % (self.title, self.pub_date)

    def save(self, *args, **kwargs):
        if not self.pub_date:
            self.pub_date = datetime.datetime.now()
        return super(Well, self).save(*args, **kwargs)


class Node(models.Model):
    well = models.ForeignKey(Well, related_name="nodes")
    order = models.IntegerField(default=0)
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey('content_type', 'object_id')

    class Meta:
        ordering = ["order"]

    def __unicode__(self):
        return "%s (%d): %s" % (self.well.title, self.order,
                                self.content_object)
{'fraction_non_alphanumeric': 0.1142737547090833, 'fraction_numerical': 0.002092925910422771, 'mean_word_length': 3.385321100917431, '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': '5374676', 'n_tokens_mistral': 700, 'n_tokens_neox': 674, 'n_words': 159}