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', ), ]