Given the ``HttpRequest``, the parent ``ModelForm`` instance, the list of inline formsets and a boolean value based on whether the parent is being added or changed, save the related objects to the database. Note that at this point save_form() and save_model() have
(self, request, form, formsets, change)
| 1467 | formset.save() |
| 1468 | |
| 1469 | def save_related(self, request, form, formsets, change): |
| 1470 | """ |
| 1471 | Given the ``HttpRequest``, the parent ``ModelForm`` instance, the |
| 1472 | list of inline formsets and a boolean value based on whether the |
| 1473 | parent is being added or changed, save the related objects to the |
| 1474 | database. Note that at this point save_form() and save_model() have |
| 1475 | already been called. |
| 1476 | """ |
| 1477 | form.save_m2m() |
| 1478 | for formset in formsets: |
| 1479 | self.save_formset(request, form, formset, change=change) |
| 1480 | |
| 1481 | def render_change_form( |
| 1482 | self, request, context, add=False, change=False, form_url="", obj=None |
no test coverage detected