blob: 89c125eefe922d76adf2e92cbe4191350ee2b0a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
from django.conf.urls import url
from django.views.generic.base import RedirectView
from . import views
app_name = "books"
urlpatterns = [
url(
r'(?P<page>\d+)/$',
views.BookListView.as_view(),
name='list',
),
url(
r'(?P<slug>[-\w]+)$',
views.BookDetailView.as_view(),
name='detail',
),
url(
r'^$',
RedirectView.as_view(url="/books/1/", permanent=False),
name="live_redirect"
),
]
|