from django.urls import path, re_path from django.views.generic.base import RedirectView from . import views app_name = "resume" urlpatterns = [ path( r'pubs//', views.PublisherListView.as_view(), name='list', ), path( r'pubs///', views.ByPublisherListView.as_view(), name='list_by_publisher', ), path( r'pubs//', views.PubItemDetailView.as_view(), name='detail', ), # redirect /slug/ to /slug/1/ for live server path( r'pubs/(?P[-\w]+)/$', RedirectView.as_view(url="/resume/pubs/%(publisher)s/1/", permanent=False), name="live_publisher_redirect" ), path( r'pubs', RedirectView.as_view(url="/resume/pubs/1/", permanent=False), name="live_redirect" ), path( r'/', views.PageView.as_view(), name="pages" ), path( r'', views.ResumeView.as_view(), name='resume', ), ]