How to properly apply createview?

I have two models, author and book where the book is related to author, now I don't know how to add books to a specific author that I'm working with and redirect the user back to the detailview of that author, I'm also using inlineformset_factory.enter image description here

I want to redirect the user to the detailview of the selected author, I also tried overriding the get_absolute_url in the models but it gives me error stating that there are no url to redirect to, I already checked the url names and I'm using the right one.enter image description here

Back to Top