from django.urls import path, re_path from . import views app_name = "blog" urlpatterns = [ re_path( r'^(?P\d{4})/(?P\d{2})/(?P[-\w]+).txt$', views.EntryDetailViewTXT.as_view(), name="detail-txt" ), re_path( r'^(?P\d{4})/(?P\d{2})/(?P[-\w]+)$', views.EntryDetailView.as_view(), name="detail" ), re_path( r'^(?P[0-9]{4})/(?P[0-9]{2})/$', views.EntryMonthArchiveView.as_view(month_format='%m'), name="list_month" ), re_path( r'(?P\d{4})/$', views.EntryYearArchiveView.as_view(), name="list_year" ), re_path( r'^(?P\d+)/$', views.EntryListView.as_view(), name="list" ), re_path( r'', views.EntryListView.as_view(), {'page': 1}, name="list" ), ]