django class-based views with inline model-form or formset
问题 I have the following models: class Bill(models.Model): date = models.DateTimeField(_(\"Date of bill\"),null=True,blank=True) class Item(models.Model): name = models.CharField(_(\"Name\"),max_length=100) price = models.FloatField(_(\"Price\")) quantity = models.IntegerField(_(\"Quantity\")) bill = models.ForeignKey(\"Bill\",verbose_name=_(\"Bill\"), related_name=\"billitem\") I know that this is possible: from django.forms.models import inlineformset_factory inlineformset_factory(Bill, Item)