<commit_before># django imports
from django.db import models
from django.utils.translation import ugettext_lazy as _

# lfs imports
from lfs.catalog.models import Product
from lfs.order.models import Order

class Topseller(models.Model):
    """Selected products are in any case among topsellers.
    """
    product  = models.ForeignKey(Product, verbose_name=_(u"Product"))
    position = models.PositiveSmallIntegerField(_(u"Position"), default=1)
    
    class Meta:
        ordering = ["position"]
        
    def __unicode__(self):
        return "%s (%s)" % (self.product.name, self.position)

class FeaturedProduct(models.Model):
    """Featured products are manually selected by the shop owner
    """
    product  = models.ForeignKey(Product, verbose_name=_(u"Product"))
    position = models.PositiveSmallIntegerField(_(u"Position"), default=1)
    
    class Meta:
        ordering = ["position"]
        
    def __unicode__(self):
        return "%s (%s)" % (self.product.name, self.position)
        
class OrderRatingMail(models.Model):
    """Saves whether and when a rating mail has been send for an order.
    """
    order = models.ForeignKey(Order, verbose_name=_(u"Order"))
    send_date = models.DateTimeField(auto_now=True)
    
    def __unicode__(self):
        return "%s (%s)" % (self.order.id, self.rating_mail_sent)
    <commit_msg>add an active field to featured products to allow removal of individual products from display<commit_after># django imports
from django.db import models
from django.utils.translation import ugettext_lazy as _

# lfs imports
from lfs.catalog.models import Product
from lfs.order.models import Order

class Topseller(models.Model):
    """Selected products are in any case among topsellers.
    """
    product  = models.ForeignKey(Product, verbose_name=_(u"Product"))
    position = models.PositiveSmallIntegerField(_(u"Position"), default=1)
    
    class Meta:
        ordering = ["position"]
        
    def __unicode__(self):
        return "%s (%s)" % (self.product.name, self.position)

class FeaturedProduct(models.Model):
    """Featured products are manually selected by the shop owner
    """
    product  = models.ForeignKey(Product, verbose_name=_(u"Product"))
    position = models.PositiveSmallIntegerField(_(u"Position"), default=1)
    active = models.BooleanField(_(u"Active"), default=True)
    
    class Meta:
        ordering = ["position"]
        
    def __unicode__(self):
        return "%s (%s)" % (self.product.name, self.position)
        
class OrderRatingMail(models.Model):
    """Saves whether and when a rating mail has been send for an order.
    """
    order = models.ForeignKey(Order, verbose_name=_(u"Order"))
    send_date = models.DateTimeField(auto_now=True)
    
    def __unicode__(self):
        return "%s (%s)" % (self.order.id, self.rating_mail_sent)
    
{'fraction_non_alphanumeric': 0.1144053017091036, 'fraction_numerical': 0.0013951866062085804, 'mean_word_length': 3.509433962264151, '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': '4084909', 'n_tokens_mistral': 831, 'n_tokens_neox': 812, 'n_words': 225}