Commit 587a7933 authored by Deokhyun Lee's avatar Deokhyun Lee

finialized the BookAddListView and is working correctly

parent 43847e19
......@@ -52,7 +52,7 @@ class BookAddListView(CreateView):
if form.is_valid():
# onSave is called, the form will have essential data and this includes pk as well.
new_book = form.save()
# pass the pk
return redirect('book-details', pk = new_book.pk)
# pass the pk and redirect.
return redirect('book_detail', pk = new_book.pk)
else:
return render(request, 'book_details.html', {'form': form})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment