Django: Add queryset to inlineformsets
问题 I want to make a queryset on a field in an inline formset .. I have Inovice and Product models and InvoiceDetails model to link the manytomany relation between them. here are the models: class Invoices(models.Model): """The Invoice Creation Class.""" invoice_number = models.CharField( _('invoice_number'), max_length=100, unique=True, null=True) .... class Products(models.Model): """Product Creation Class.""" company = models.ForeignKey(Company, default=1) barcode = models.CharField(_('barcode