added custom autocomplete for category in product admin, still not working correctly

This commit is contained in:
Sam
2021-03-04 13:23:11 +00:00
parent 657b717c07
commit 085c6f86a7
4 changed files with 18 additions and 19 deletions

View File

@@ -60,9 +60,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, blank=True)
tags = TagField(to=TreeTag)
tags = TagField(to=TreeTag, blank=True)
category = SingleTagField(to=CategoryTag, null=True, blank=True, on_delete=models.SET_NULL) # main tag category
attributes = TagField(to=AttributeTag, related_name='product_attributes')
attributes = TagField(to=AttributeTag, blank=True, related_name='product_attributes')
identifiers = models.TextField('Identificador único de producto', null=True, blank=True)
# internal