summaryrefslogtreecommitdiff
path: root/app/people/urls.py
blob: 0ae38ebd53e4b2941962e49c98be36149beaa401 (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
25
26
27
28
29
30
31
32
33
34
35
36
from django.urls import path, re_path
from django.views.generic.base import RedirectView

from . import views

app_name = "people"

urlpatterns = [
    re_path(
        r'^tag/(?P<slug>[-\w]+)/$',
        views.PersonTagListView.as_view(),
        {'page':1}, 
        name='list-tag'
    ),
    re_path(
        r'tag/(?P<slug>[-\w]+)/(?P<page>\d+)/$',
        views.PersonTagListView.as_view(),
        name='list-tag'
    ),
    re_path(
        r'^(?P<page>\d+)/$',
        views.PersonListView.as_view(),
        name="list"
    ),
    path(
        r'', 
        views.PersonListView.as_view(), 
        {'page':1}, 
        name="list"
    ),
    path(
        r'<str:slug>/',
        views.PersonDetailView.as_view(),
        name='detail',
    ),
]