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

class EntryManager(models.Manager):
	def get_convo(self, entry):
		""" return this object and all children """
		return self.filter(models.Q(original=entry) | models.Q(pk=entry.id))

class Entry(models.Model):
	original = models.ForeignKey('self', null=True, related_name="orginal_entry")
	parent = models.ForeignKey('self', null=True, related_name="parent_entry")
	title = models.CharField(max_length = 150)
	body = models.TextField(max_length = 4000)
	owner = models.ForeignKey(User, null=True)
	date_created = models.DateTimeField(auto_now_add=True)
	level = models.IntegerField()
	
	objects = EntryManager()
	
	def __unicode__(self):
		return self.title
		
	def isOriginal(self):<commit_msg>add updated date for Haystack search<commit_after>from django.db import models
from django.contrib.auth.models import User

class EntryManager(models.Manager):
	def get_convo(self, entry):
		""" return this object and all children """
		return self.filter(models.Q(original=entry) | models.Q(pk=entry.id))

class Entry(models.Model):
	original = models.ForeignKey('self', null=True, related_name="orginal_entry")
	parent = models.ForeignKey('self', null=True, related_name="parent_entry")
	title = models.CharField(max_length = 150)
	body = models.TextField(max_length = 4000)
	owner = models.ForeignKey(User, null=True)
	date_created = models.DateTimeField(auto_now_add=True)
	date_modified = models.DateTimeField(auto_now=True)
	level = models.IntegerField()
	
	objects = EntryManager()
	
	def __unicode__(self):
		return self.title
		
	def isOriginal(self):
{'fraction_non_alphanumeric': 0.12104622871046229, 'fraction_numerical': 0.00851581508515815, 'mean_word_length': 6.183406113537118, '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': '569212', 'n_tokens_mistral': 540, 'n_tokens_neox': 505, 'n_words': 112}