1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
from django.conf.urls import url
from django.views.generic.base import RedirectView
from . import views
app_name = "links"
urlpatterns = [
url(
r'tag/(?P<slug>[-\w]+)/(?P<page>\d+)/$',
views.LinkTagListView.as_view(),
name='list-tag'
),
url(
r'(?P<slug>[-\d]+).txt$',
views.LinkDetailViewTXT.as_view(),
name="detail-txt"
),
url(
r'(?P<slug>[-\d]+)$',
views.LinkDetailView.as_view(),
name='detail'
),
url(
r'(?P<page>\d+)/$',
views.LinkListView.as_view(),
name='list'
),
url(
r'^tag/(?P<slug>[-\w]+)/$',
RedirectView.as_view(url="/links/tag/%(slug)s/1/", permanent=False),
name="live-redirect-tag"
),
url(
r'^$',
RedirectView.as_view(url="/links/1/", permanent=False),
name="live-redirect"
),
]
|