blob: c05fed7c45834ee5a3ebb9b657db7fb525eb2481 (
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(
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"
),
]
|