diff options
author | luxagraf <sng@luxagraf.net> | 2021-08-14 09:39:08 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2021-08-14 09:39:08 -0400 |
commit | 9327e01c60b114286f5a142552aae60843029a48 (patch) | |
tree | 7f353f4299d50013c3b90f7b749fc6ab211b32d4 /app/books/urls.py | |
parent | 0feb366b10cf422f12d18fa753e5d876120f4195 (diff) |
initial commit
Diffstat (limited to 'app/books/urls.py')
-rw-r--r-- | app/books/urls.py | 24 |
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', + ), +] |