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
40
41
42
43
44
45
46
47
|
from django.urls import path, re_path
from django.views.generic.base import RedirectView
from . import views
app_name = "resume"
urlpatterns = [
path(
r'',
views.PageView.as_view(),
{'path': 'work', 'slug': 'profile'},
name="pages"
),
path(
r'<str:slug>/',
views.PageView.as_view(),
{'path': 'work'},
name="pages"
),
path(
r'pubs/<str:page>/',
views.PublisherListView.as_view(),
name='list',
),
path(
r'pubs/',
views.PublisherListView.as_view(),
{'page': 1},
name="list"
),
path(
r'pubs/<str:publisher>/<int:page>/',
views.ByPublisherListView.as_view(),
name='list_by_publisher',
),
path(
r'pubs/<str:publisher>/<str:slug>',
views.PubItemDetailView.as_view(),
name='detail',
),
path(
r'pubs/(?P<publisher>[-\w]+)/$',
RedirectView.as_view(url="/resume/pubs/%(publisher)s/1/", permanent=False),
name="live_publisher_redirect"
),
]
|