Remove author flow
This commit is contained in:
parent
f1b699d810
commit
79d9c493f7
2 changed files with 12 additions and 6 deletions
|
@ -163,6 +163,10 @@ class EditBook(View):
|
|||
data['confirm_mode'] = True
|
||||
return TemplateResponse(request, 'edit_book.html', data)
|
||||
|
||||
remove_authors = request.POST.getlist('remove_authors')
|
||||
for author_id in remove_authors:
|
||||
book.authors.remove(author_id)
|
||||
|
||||
book = form.save()
|
||||
return redirect('/book/%s' % book.id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue