first custom tag seriliazer tests

This commit is contained in:
Sam
2021-01-25 11:52:36 +00:00
parent fc0478299b
commit b2c857878b
7 changed files with 61 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
from django.contrib.gis.db import models
from tagulous.models import SingleTagField, TagField
from companies.models import Company
# Create your models here.
@@ -30,9 +32,9 @@ class Product(models.Model):
update_date = models.DateTimeField('Fecha de actualización de producto', null=True, blank=True)
discount = models.DecimalField('Descuento', max_digits=5, decimal_places=2, null=True, blank=True)
stock = models.PositiveIntegerField('Stock', null=True)
# tags = models.ManyToMany(Tag, null=True, blank=True )
# category = models.ForeignKey(Tag, null=true) # main tag category
# attributes = models.ManyToMany(Tag, null=True, blank=True )
tags = TagField( )
category = SingleTagField() # main tag category
attributes = TagField()
identifiers = models.TextField('Identificador único de producto', null=True, blank=True)
# internal