switched tag field to local TagTreeModel

This commit is contained in:
Sam
2021-02-15 10:07:38 +00:00
parent 798c960ead
commit eb174f027a
4 changed files with 11 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ from django.contrib.gis.db import models
from tagulous.models import SingleTagField, TagField, TagTreeModel
from core.models import TreeTag
from companies.models import Company
# Create your models here.
@@ -33,9 +34,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 = TagField(force_lowercase=True, max_count=20, tree=True)
tags = TagField(to=TreeTag)
category = SingleTagField(null=True) # main tag category
attributes = TagField(force_lowercase=True, max_count=20, tree=True)
attributes = TagField(to=TreeTag, related_name='product_attributes')
identifiers = models.TextField('Identificador único de producto', null=True, blank=True)
# internal