Extend manufacturer and make volume frendly

This commit is contained in:
2022-04-06 21:24:00 +02:00
parent 1b55acd09f
commit 9a1740f7c1
10 changed files with 137 additions and 5 deletions

View File

@@ -8,9 +8,15 @@ from dcc.utils import get_image_preview, slugify
class Manufacturer(models.Model):
name = models.CharField(max_length=128, unique=True)
category = models.CharField(
max_length=64, choices=settings.MANUFACTURER_TYPES
)
website = models.URLField(blank=True)
logo = models.ImageField(upload_to="images/", null=True, blank=True)
class Meta:
ordering = ["category", "name"]
def __str__(self):
return self.name