summaryrefslogtreecommitdiff
path: root/app/books/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/books/urls.py')
-rw-r--r--app/books/urls.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/books/urls.py b/app/books/urls.py
new file mode 100644
index 0000000..d7ffd33
--- /dev/null
+++ b/app/books/urls.py
@@ -0,0 +1,24 @@
+from django.urls import path, re_path
+
+from . import views
+
+app_name = "books"
+
+urlpatterns = [
+ re_path(
+ r'^(?P<page>\d+)/$',
+ views.BookListView.as_view(),
+ name="list"
+ ),
+ path(
+ r'',
+ views.BookListView.as_view(),
+ {'page': 1},
+ name="list"
+ ),
+ path(
+ r'<str:slug>',
+ views.BookDetailView.as_view(),
+ name='detail',
+ ),
+]