Hi all!
Me need set data in new inline form using request, sample code:
def get_formset_kwargs(self, request, obj, inline, prefix):
formset_params = super().get_formset_kwargs(request, obj, inline, prefix)
if request.GET.get('based'):
if not obj.id and isinstance(inline, ThroughFriableInvoiceModelInline):
formset_params.update(initial=[
{'friable': '113', 'count': 1}, {'friable': 12, 'count': 1234},
])
I set first element {‘friable’: ‘113’, ‘count’: 1}.
How is get multiple element in new inline form? Thnx and sorry for My Enflish.