Commit 473e2cae authored by justin's avatar justin

Ordered BookListView and AuthorListView alphabetically

parent 4072dc6d
...@@ -15,6 +15,7 @@ def index(request): ...@@ -15,6 +15,7 @@ def index(request):
class BookListView(ListView): class BookListView(ListView):
model = Books model = Books
template_name = "bookshelf/books.html" template_name = "bookshelf/books.html"
ordering = ["title"]
class BookDetailView(DetailView): class BookDetailView(DetailView):
...@@ -25,6 +26,7 @@ class BookDetailView(DetailView): ...@@ -25,6 +26,7 @@ class BookDetailView(DetailView):
class AuthorListView(ListView): class AuthorListView(ListView):
model = Author model = Author
template_name = "bookshelf/authors.html" template_name = "bookshelf/authors.html"
ordering = ["first_name"]
class AuthorDetailView(DetailView): class AuthorDetailView(DetailView):
......
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