from django.urls import path, re_path from django.views.generic.base import RedirectView from . import views app_name = "posts" urlpatterns = [ path( r'.txt', views.EntryDetailViewTXT.as_view(), name="detail-txt" ), path( r'', views.EntryDetailView.as_view(), name="detail" ), re_path( r'/', views.EntryList.as_view(), name="list" ), ]