diff options
Diffstat (limited to 'app/notes/urls.py')
-rw-r--r-- | app/notes/urls.py | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/app/notes/urls.py b/app/notes/urls.py index 3f46915..00a8cce 100644 --- a/app/notes/urls.py +++ b/app/notes/urls.py @@ -1,4 +1,5 @@ from django.conf.urls import url +from django.views.generic.base import RedirectView from . import views @@ -6,9 +7,23 @@ app_name = "notes" urlpatterns = [ url( + r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+).txt$', + views.NoteDetailViewTXT.as_view(), + name="detail-txt" + ), + url( + r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+).amp$', + views.NoteDetailViewAMP.as_view(), + name="detail-amp" + ), + url( r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$', - views.entry_detail + views.NoteDetailView.as_view(), + name="detail" ), + + + url( r'(?P<year>\d{4})/(?P<month>\d{2})/$', views.date_list, @@ -20,6 +35,17 @@ urlpatterns = [ name="notes_by_year" ), url( + r'(?P<page>\d+)/$', + views.NoteList.as_view(), + name="list" + ), + # redirect / to /1/ for live server + url( + r'', + RedirectView.as_view(url="/field-notes/1/", permanent=False), + name="live_redirect" + ), + url( r'^$', views.entry_list, name="notes_archive" |