django class-based views with inline model-form or formset

前端 未结 7 1071
有刺的猬
有刺的猬 2020-11-28 18:08

I have the following models:

class Bill(models.Model):
    date = models.DateTimeField(_(\"Date of bill\"),null=True,blank=True)

class Item(models.Model):
          


        
7条回答
  •  一生所求
    2020-11-28 18:57

    The code in Jordan's answer didn't work for me. I posted my own question about this, which I believe I've now solved. The first argument to inlineformset_factory should be Book, not BookForm.

提交回复
热议问题