1👍
For you requirement, you can use ManyToManyField
in Bundle
model instead of ForeignKey
in Product
model.
Check below code.
class Bundle(models.Model):
title = models.CharField(max_length=255)
product = models.ManyToManyField('Product')
class Product(models.Model):
title = models.CharField(max_length=255)
Then you can register admin interfaces:
admin.site.register(Bundle)
admin.site.register(Product)
Then you can add series of Product
from a dropdown/search.
Source:stackexchange.com