Commit 10cc0a4c authored by RJC's avatar RJC

pep guidelines

parent 5b820bac
Pipeline #3042 canceled with stages
...@@ -7,4 +7,4 @@ urlpatterns = [ ...@@ -7,4 +7,4 @@ urlpatterns = [
path('books/<int:pk>/', BookDetailView.as_view()), path('books/<int:pk>/', BookDetailView.as_view()),
path('authors/', AuthorListView.as_view()), path('authors/', AuthorListView.as_view()),
path('authors/<int:pk>/', AuthorDetailView.as_view()), path('authors/<int:pk>/', AuthorDetailView.as_view()),
] ]
\ No newline at end of file
...@@ -29,6 +29,7 @@ class AuthorListView(generic.ListView): ...@@ -29,6 +29,7 @@ class AuthorListView(generic.ListView):
queryset = Author.objects.all() queryset = Author.objects.all()
context_object_name = 'authors' context_object_name = 'authors'
class AuthorDetailView(generic.DetailView): class AuthorDetailView(generic.DetailView):
model = Author model = Author
template_name = 'bookshelf/author_detail.html' template_name = 'bookshelf/author_detail.html'
......
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