<commit_before>from django.db import models
from django.utils import timezone

# Create your models here.

class Post(models.Model):
    post_title = models.CharField('Titulo del post',max_length=100, blank=False)
    publish_date = models.DateTimeField('Fecha de publicación', blank=False)
    edit_date = models.DateTimeField('Fecha de edición', blank=False)
    post_content = models.TextField('Contenido', blank=False)
    def __str__(self):
        return self.post_title
    def published(self):
        self.publish_date = timezone.now()
        self.save()

class Comment(models.Model):
    publish_date = models.DateTimeField('Fecha de publicación', blank=False)
    comment_content = models.TextField('Contenido del comentario', blank=False)
    comment_author = models.CharField('Autor del comentario', max_length=100, blank=False)
    post_id = models.ForeignKey(Post, on_delete=models.CASCADE)
    def __str__(self):
        return self.comment_author + '[' + self.publish_date + ']'<commit_msg>Added app ckeditor in models<commit_after>from django.db import models
from django.utils import timezone
from ckeditor.fields import RichTextField
# Create your models here.

class Post(models.Model):
    post_title = models.CharField('Titulo del post',max_length=100, blank=False)
    publish_date = models.DateTimeField('Fecha de publicación', blank=False)
    edit_date = models.DateTimeField('Fecha de edición', blank=False)
    post_content = RichTextField()
    def __str__(self):
        return self.post_title
    def published(self):
        self.publish_date = timezone.now()
        self.save()

class Comment(models.Model):
    publish_date = models.DateTimeField('Fecha de publicación', blank=False)
    comment_content = models.TextField('Contenido del comentario', blank=False)
    comment_author = models.CharField('Autor del comentario', max_length=100, blank=False)
    post_id = models.ForeignKey(Post, on_delete=models.CASCADE)
    def __str__(self):
        return self.comment_author + '[' + self.publish_date + ']'
{'fraction_non_alphanumeric': 0.10660146699266504, 'fraction_numerical': 0.0058679706601467, 'mean_word_length': 4.574931880108992, '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': '1401739', 'n_tokens_mistral': 623, 'n_tokens_neox': 610, 'n_words': 141}