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