Commit e6a1456d authored by RJC's avatar RJC

fixed redirect for author create

parent 18b729be
......@@ -57,7 +57,7 @@ class AuthorCreateView(generic.CreateView):
template_name = 'bookshelf/add-author.html'
def get_success_url(self):
return reverse('bookshelf:bookdetailview', kwargs={'pk': self.object.id},
return reverse('bookshelf:authordetailview', kwargs={'pk': self.object.id},
current_app=self.request.resolver_match.namespace)
......@@ -66,3 +66,7 @@ class AuthorDetailView(generic.DetailView):
template_name = 'bookshelf/author_detail.html'
queryset = Author.objects.all()
context_object_name = 'authors'
class AuthorUpdateView(generic.UpdateView):
model = Author
\ 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