From 8cb4c03998d2f2e9ff1a209a2f2a408a784079c3 Mon Sep 17 00:00:00 2001 From: Max Yakovenko Date: Thu, 26 Jul 2018 00:46:22 +0300 Subject: [PATCH] move offer model to cart app --- products/models.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/products/models.py b/products/models.py index 05fee46..e2846d8 100644 --- a/products/models.py +++ b/products/models.py @@ -159,24 +159,3 @@ class ProductImage(AbstractStatusModel): class Meta: verbose_name = _('Изображение продукта') verbose_name_plural = _('Изображения продуктов') - -# class Offer(models.Model): -# name = models.CharField(max_length=64, blank=True, null=True, default=None) -# slug = AutoSlugField(populate_from='name') -# price = models.DecimalField(max_digits=8, decimal_places=2, null=True, default=0.00) -# # points = models.DecimalField(max_digits=8, decimal_places=2, null=True, default=0.00) -# products = models.ForeignKey(Product, on_delete=models.CASCADE, blank=True, null=True, default=None, -# related_name='variants') -# is_active = models.BooleanField(default=True) -# attributes = HStoreField(blank=True, null=True, default={}) -# -# def __str__(self): -# return self.name -# -# class Meta: -# verbose_name = 'Offer' -# verbose_name_plural = 'Offers' -# -# def save(self, *args, **kwargs): -# self.points = self.price * decimal.Decimal('0.1') -# super(Offer, self).save(*args, **kwargs)