Add Catalogs views, but still need to fix templates (use books for now)

This commit is contained in:
2024-11-29 23:43:36 +01:00
parent 1a3b30ace3
commit 83444266cb
6 changed files with 58 additions and 7 deletions

View File

@@ -15,6 +15,8 @@ from portal.views import (
Types,
Books,
GetBook,
Catalogs,
GetCatalog,
SearchObjects,
)
@@ -98,6 +100,21 @@ urlpatterns = [
name="books_pagination"
),
path("bookshelf/book/<uuid:uuid>", GetBook.as_view(), name="book"),
path(
"bookshelf/catalogs",
Catalogs.as_view(template="bookshelf/books.html"),
name="catalogs"
),
path(
"bookshelf/catalogs/page/<int:page>",
Catalogs.as_view(template="bookshelf/books.html"),
name="catalogs_pagination"
),
path(
"bookshelf/catalog/<uuid:uuid>",
GetCatalog.as_view(),
name="catalog"
),
path(
"search",
SearchObjects.as_view(http_method_names=["post"]),