Answer the question
In order to leave comments, you need to log in
How to get new entries in inlineformset on save and set field value?
class Foo(models.Model):
name = model.CharField(max_length=255)
class Bar(models.Model):
parent = models.ForeignKey(Foo, on_delete=models.CASCADE)
name = model.CharField(max_length=255)
created_by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
BarInlineFormset = inlineformset_factory(Foo, Bar, extra=3)
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