<commit_before>from django.db import models

# Create your models here.
<commit_msg>implemented products app models<commit_after>from django.db import models
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext_lazy as _


class Category(models.Model):
    name = models.CharField(verbose_name=_("Name"), max_length=255)
    is_visible = models.BooleanField(verbose_name=_("Visible"), default=True)

    class Meta:
        verbose_name = _("Category")
        verbose_plural_name = _("Categories")
        ordering = ("name", )

    def __unicode__(self):
        return smart_unicode(self.name)


class Product(models.Model):
    name = models.CharField(verbose_name=_("Name"), max_length=255)
    category = models.ForeignKey(Category, verbose_name=_("Category"), related_name="products")
    price = models.DecimalField(max_digits=10, decimal_places=2, default="0.0")
    is_visible = models.BooleanField(verbose_name=_("Visible"), default=True)

    class Meta:
        verbose_name = _("Product")
        verbose_plural_name = _("Products")
        ordering = ("name", )

    def __unicode__(self):
        return smart_unicode(self.name)

{'fraction_non_alphanumeric': 0.1163575042158516, 'fraction_numerical': 0.00927487352445194, 'mean_word_length': 4.3954545454545455, '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': '5500369', 'n_tokens_mistral': 362, 'n_tokens_neox': 342, 'n_words': 72}