<commit_before>from django.db import models
from cms.models import CMSPlugin
from django.utils.translation import ugettext_lazy as _


class Update(models.Model):
    """
    Defines a date on which updates were made.
    """
    date = models.DateField(_('Update Date'))

    def __str__(self):
        return str(self.date)

    class Meta:
        verbose_name = 'update'
        verbose_name_plural = 'updates'
        app_label = 'updates'


class UpdateItem(models.Model):
    """
    Defines one or many items that were updated on a single date.
    """
    update = models.ForeignKey(Update)
    item = models.CharField(_('Update Item'), max_length=256)
    description = models.TextField(
        _('Item Description (Optional)'),
        help_text="This field is optional and should only be used when the description is too long for the sidebar plugin.",
        null=True,
        blank=True
    )

    def __str__(self):
        return self.item

    class Meta:
        verbose_name = 'updateitem'
        verbose_name_plural = 'updateitems'
        app_label = 'updates'


class UpdatesPlugin(CMSPlugin):
    NUMBER_CHOICES = (
        (5, 5),
        (10, 10),
        (25, 25),
        (100, 100),
    )
    number_to_show = models.IntegerField(
        max_length=10, choices=NUMBER_CHOICES)<commit_msg>Remove choices for any number of updates.<commit_after>from django.db import models
from cms.models import CMSPlugin
from django.utils.translation import ugettext_lazy as _


class Update(models.Model):
    """
    Defines a date on which updates were made.
    """
    date = models.DateField(_('Update Date'))

    def __str__(self):
        return str(self.date)

    class Meta:
        verbose_name = 'update'
        verbose_name_plural = 'updates'
        app_label = 'updates'


class UpdateItem(models.Model):
    """
    Defines one or many items that were updated on a single date.
    """
    update = models.ForeignKey(Update)
    item = models.CharField(_('Update Item'), max_length=256)
    description = models.TextField(
        _('Item Description (Optional)'),
        help_text="This field is optional and should only be used when the description is too long for the sidebar plugin.",
        null=True,
        blank=True
    )

    def __str__(self):
        return self.item

    class Meta:
        verbose_name = 'updateitem'
        verbose_name_plural = 'updateitems'
        app_label = 'updates'


class UpdatesPlugin(CMSPlugin):
    number_to_show = models.IntegerField(
        max_length=10,)

{'fraction_non_alphanumeric': 0.09390962671905698, 'fraction_numerical': 0.010216110019646365, 'mean_word_length': 2.7222222222222223, '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': '1257515', 'n_tokens_mistral': 775, 'n_tokens_neox': 724, 'n_words': 217}