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