inline save test
This commit is contained in:
parent
ea381ef53e
commit
f1cd2638a9
|
@ -29,10 +29,10 @@ def edit_profile(request):
|
|||
if form.is_valid():
|
||||
instance = form.save()
|
||||
form.save()
|
||||
# inlines = [inline(request.POST, request.FILES, instance=person) for inline in form.inlines]
|
||||
# for inline in inlines:
|
||||
# if inline.is_valid():
|
||||
# inline.save()
|
||||
inlines = [inline(request.POST, request.FILES, instance=person) for inline in form.inlines]
|
||||
for inline in inlines:
|
||||
if inline.is_valid():
|
||||
inline.save()
|
||||
|
||||
else:
|
||||
form = PersonForm(instance=person)
|
||||
|
|
Loading…
Reference in New Issue
Block a user