Ticket #6629: options.diff
File options.diff, 1.0 KB (added by , 17 years ago) |
---|
-
options.py
555 555 ModelForm = self.form_change(request, obj) 556 556 inline_formsets = [] 557 557 if request.method == 'POST': 558 form = ModelForm(request.POST, request.FILES )558 form = ModelForm(request.POST, request.FILES, instance=obj) 559 559 for FormSet in self.formsets_change(request, obj): 560 560 inline_formset = FormSet(obj, request.POST, request.FILES) 561 561 inline_formsets.append(inline_formset) … … 563 563 if all_valid(inline_formsets) and form.is_valid(): 564 564 return self.save_change(request, model, form, inline_formsets) 565 565 else: 566 form = ModelForm( )566 form = ModelForm(instance=obj) 567 567 for FormSet in self.formsets_change(request, obj): 568 568 inline_formset = FormSet(obj) 569 569 inline_formsets.append(inline_formset)