Я загружаю сайт магазина с помощью Django.
Мне нужно загрузить 4 фотографии для одного товара. Но я могу загрузить только одну фотографию.
Вы можете мне помочь?
мои модели в товарах:
class Product(models.Model):
Name = models.CharField(max_length=60)
Descriptions = models.TextField()
Price = models.IntegerField()
Image = models.ImageField(upload_to='product')
category = models.ManyToManyField(Category, null=True, blank=True)
Discount = models.SmallIntegerField(null=True, blank=True)
Size = models.ManyToManyField(ProductSize, related_name='product')
Color = models.ManyToManyField(ProductColor, related_name='product', blank=True)
Property = models.ManyToManyField(ProductProperty, related_name='product')
Мои просмотры в продуктах:
class ProductDetail(DetailView):
template_name = 'product/single-product.html'
model = Product
Подробнее здесь: https://stackoverflow.com/questions/787 ... -the-store