<commit_before># -*- coding: utf-8 -*-
#
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © <NAME>. See NOTICE for more information.
#
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from catalogue.models import Chunk, Image


class BookPublishRecord(models.Model):
    """
        A record left after publishing a Book.
    """

    book = models.ForeignKey('Book', verbose_name=_('book'), related_name='publish_log')
    timestamp = models.DateTimeField(_('time'), auto_now_add=True)
    user = models.ForeignKey(User, verbose_name=_('user'))

    class Meta:
        app_label = 'catalogue'
        ordering = ['-timestamp']
        verbose_name = _('book publish record')
        verbose_name = _('book publish records')


class ChunkPublishRecord(models.Model):
    """
        BookPublishRecord details for each Chunk.
    """

    book_record = models.ForeignKey(BookPublishRecord, verbose_name=_('book publish record'))
    change = models.ForeignKey(Chunk.change_model, related_name='publish_log', verbose_name=_('change'))

    class Meta:
        app_label = 'catalogue'
        verbose_name = _('chunk publish record')
        verbose_name = _('chunk publish records')


class ImagePublishRecord(models.Model):
    """A record left after publishing an Image."""

    image = models.ForeignKey(Image, verbose_name=_('image'), related_name='publish_log')
    timestamp = models.DateTimeField(_('time'), auto_now_add=True)
    user = models.ForeignKey(User, verbose_name=_('user'))
    change = models.ForeignKey(Image.change_model, related_name='publish_log', verbose_name=_('change'))

    class Meta:
        app_label = 'catalogue'
        ordering = ['-timestamp']
        verbose_name = _('image publish record')
        verbose_name = _('image publish records')<commit_msg>minor fix in verbose names<commit_after># -*- coding: utf-8 -*-
#
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © <NAME>. See NOTICE for more information.
#
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from catalogue.models import Chunk, Image


class BookPublishRecord(models.Model):
    """
        A record left after publishing a Book.
    """

    book = models.ForeignKey('Book', verbose_name=_('book'), related_name='publish_log')
    timestamp = models.DateTimeField(_('time'), auto_now_add=True)
    user = models.ForeignKey(User, verbose_name=_('user'))

    class Meta:
        app_label = 'catalogue'
        ordering = ['-timestamp']
        verbose_name = _('book publish record')
        verbose_name_plural = _('book publish records')


class ChunkPublishRecord(models.Model):
    """
        BookPublishRecord details for each Chunk.
    """

    book_record = models.ForeignKey(BookPublishRecord, verbose_name=_('book publish record'))
    change = models.ForeignKey(Chunk.change_model, related_name='publish_log', verbose_name=_('change'))

    class Meta:
        app_label = 'catalogue'
        verbose_name = _('chunk publish record')
        verbose_name_plural = _('chunk publish records')


class ImagePublishRecord(models.Model):
    """A record left after publishing an Image."""

    image = models.ForeignKey(Image, verbose_name=_('image'), related_name='publish_log')
    timestamp = models.DateTimeField(_('time'), auto_now_add=True)
    user = models.ForeignKey(User, verbose_name=_('user'))
    change = models.ForeignKey(Image.change_model, related_name='publish_log', verbose_name=_('change'))

    class Meta:
        app_label = 'catalogue'
        ordering = ['-timestamp']
        verbose_name = _('image publish record')
        verbose_name_plural = _('image publish records')
{'fraction_non_alphanumeric': 0.11871435977190253, 'fraction_numerical': 0.0010368066355624676, 'mean_word_length': 3.9284802043422733, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3381410', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1089, 'n_words': 283}