Answer the question
In order to leave comments, you need to log in
How to allow only one True value for a BooleanField ForeignKey to be accepted?
There is this model:
class ProductImage(models.Model):
product = models.ForeignKey(_(u"Продукт"), Product, related_name='images')
image = models.ImageField(_(u"Изображение"), upload_to="product_images/")
is_main = models.BooleanField()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question