inlineformset_factory create new objects and edit objects after created

前端 未结 4 1402
说谎
说谎 2020-12-13 07:53

In the django docs, there\'s an example of using inlineformset_factory to edit already created objects

https://docs.djangoproject.com/en/dev/topics/forms/mo

4条回答
  •  北海茫月
    2020-12-13 08:06

    i did exactly what you are trying : https://github.com/yakoub/django_training/tree/master/article

    you need to create a separate form using the prefix attribute . then when you save you need to iterate over all books and associate them with the author you just created .

提交回复
热议问题