diff options
Diffstat (limited to 'app/posts/urls')
-rw-r--r-- | app/posts/urls/__init__old.py | 4 | ||||
-rw-r--r-- | app/posts/urls/essay_urls.py | 29 | ||||
-rw-r--r-- | app/posts/urls/field_note_urls.py | 39 | ||||
-rw-r--r-- | app/posts/urls/guide_urls.py | 30 | ||||
-rw-r--r-- | app/posts/urls/guide_urls_old.py | 29 | ||||
-rw-r--r-- | app/posts/urls/jrnl_urls.py | 60 | ||||
-rw-r--r-- | app/posts/urls/review_urls.py | 29 | ||||
-rw-r--r-- | app/posts/urls/src_urls.py | 49 |
8 files changed, 269 insertions, 0 deletions
diff --git a/app/posts/urls/__init__old.py b/app/posts/urls/__init__old.py new file mode 100644 index 0000000..4993c34 --- /dev/null +++ b/app/posts/urls/__init__old.py @@ -0,0 +1,4 @@ +from .guide_urls import urlpatterns as guide_urlpatterns +from .reviews_urls import urlpatterns as review_urlpatterns + +urlpatterns = review_urlpatterns + guide_urlpatterns diff --git a/app/posts/urls/essay_urls.py b/app/posts/urls/essay_urls.py new file mode 100644 index 0000000..3f0d7d7 --- /dev/null +++ b/app/posts/urls/essay_urls.py @@ -0,0 +1,29 @@ +from django.urls import path, re_path + +from ..views import guide_views as views + +app_name = "essays" + +urlpatterns = [ + path( + r'<str:slug>', + views.PostDetailView.as_view(), + name="detail" + ), + path( + r'<str:slug>.txt', + views.PostDetailViewTXT.as_view(), + name="detail-txt" + ), + path( + r'<int:page>/', + views.EssayListView.as_view(), + name="list" + ), + path( + r'', + views.EssayListView.as_view(), + {'page':1}, + name="list" + ), +] diff --git a/app/posts/urls/field_note_urls.py b/app/posts/urls/field_note_urls.py new file mode 100644 index 0000000..7352b0e --- /dev/null +++ b/app/posts/urls/field_note_urls.py @@ -0,0 +1,39 @@ +from django.urls import path, re_path + +from ..views import field_note_views as views + +app_name = "fieldnotes" + +urlpatterns = [ + re_path( + r'(?P<year>[0-9]{4})/$', + views.FieldNoteYearArchiveView.as_view(), + name="list_year" + ), + path( + r'', + views.FieldNoteListView.as_view(), + {'page': 1}, + name="list" + ), + path( + r'<page>/', + views.FieldNoteListView.as_view(), + name="list" + ), + path( + r'<int:year>/<int:month>/<str:slug>.txt', + views.FieldNoteDetailViewTXT.as_view(), + name="detail-txt" + ), + path( + r'<int:year>/<int:month>/<str:slug>', + views.FieldNoteDetailView.as_view(), + name="detail" + ), + path( + r'<int:year>/<int:month>/', + views.FieldNoteMonthArchiveView.as_view(month_format='%m'), + name="list_month" + ), +] diff --git a/app/posts/urls/guide_urls.py b/app/posts/urls/guide_urls.py new file mode 100644 index 0000000..e0a2210 --- /dev/null +++ b/app/posts/urls/guide_urls.py @@ -0,0 +1,30 @@ +from django.urls import path, re_path, include +from django.views.generic.base import RedirectView + +from ..views import guide_views as views + +app_name = "guides" + +urlpatterns = [ + path( + r'', + views.GuideListView.as_view(), + {'page':1}, + name="guide-base" + ), + path(r'field-test/', include('posts.urls.review_urls', namespace='reviews')), + re_path(r'^field-test/$', RedirectView.as_view(url='/field-tests/')), + #path(r'field-tests/', include('posts.urls', namespace='review-list')), + #path(r'review/', include('posts.review_urls')), + re_path(r'^review/$', RedirectView.as_view(url='/guides/')), + #path( + # r'<str:slug>', + # views.EntryDetailView.as_view(), + # name="detail" + #), + #re_path( + # r'<int:page>/', + # views.EntryList.as_view(), + # name="list" + #), +] diff --git a/app/posts/urls/guide_urls_old.py b/app/posts/urls/guide_urls_old.py new file mode 100644 index 0000000..d43d76a --- /dev/null +++ b/app/posts/urls/guide_urls_old.py @@ -0,0 +1,29 @@ +from django.urls import path, re_path + +from . import views + +app_name = "guides" + +urlpatterns = [ + path( + r'<str:slug>', + views.PostDetailView.as_view(), + name="detail" + ), + path( + r'<str:slug>.txt', + views.PostDetailViewTXT.as_view(), + name="detail-txt" + ), + path( + r'<int:page>/', + views.GuidesListView.as_view(), + name="list" + ), + path( + r'', + views.GuidesListView.as_view(), + {'page':1}, + name="list" + ), +] diff --git a/app/posts/urls/jrnl_urls.py b/app/posts/urls/jrnl_urls.py new file mode 100644 index 0000000..d7f0fb1 --- /dev/null +++ b/app/posts/urls/jrnl_urls.py @@ -0,0 +1,60 @@ +from django.urls import path, re_path + +from ..views import jrnl_views as views + +app_name = "jrnl" + +urlpatterns = [ + path( + r'feed.xml', + views.JrnlRSSFeedView(), + name="feed" + ), + re_path( + r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+).txt$', + views.JrnlDetailViewTXT.as_view(), + name="detail-txt" + ), + re_path( + r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$', + views.JrnlDetailView.as_view(), + name="detail" + ), + re_path( + r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$', + views.JrnlMonthArchiveView.as_view(month_format='%m'), + name="list_month" + ), + re_path( + r'(?P<year>\d{4})/$', + views.JrnlYearArchiveView.as_view(), + name="list_year" + ), + re_path( + r'^(?P<page>\d+)/$', + views.JrnlListView.as_view(), + name="list" + ), + path( + r'latest/', + views.JrnlLatestView.as_view(), + name="latest" + ), + re_path( + r'(?P<slug>[-\w]+)/(?P<page>\d+)/$', + views.JrnlCountryListView.as_view(), + name="list_country" + ), + re_path( + r'^(?P<slug>[-\w]+)/$', + views.JrnlCountryListView.as_view(), + {'page':1}, + name="list_country" + ), + re_path( + r'', + views.JrnlListView.as_view(), + {'page':1}, + name="list" + ), +] diff --git a/app/posts/urls/review_urls.py b/app/posts/urls/review_urls.py new file mode 100644 index 0000000..6b78e43 --- /dev/null +++ b/app/posts/urls/review_urls.py @@ -0,0 +1,29 @@ +from django.urls import path, re_path + +from ..views import guide_views as views + +app_name = "reviews" + +urlpatterns = [ + path( + r'<str:slug>', + views.PostDetailView.as_view(), + name="review-detail" + ), + path( + r'<str:slug>.txt', + views.PostDetailViewTXT.as_view(), + name="review-detail-txt" + ), + path( + r'<int:page>/', + views.ReviewsListView.as_view(), + name="review-list" + ), + path( + r'', + views.ReviewsListView.as_view(), + {'page':1}, + name="review-list" + ), +] diff --git a/app/posts/urls/src_urls.py b/app/posts/urls/src_urls.py new file mode 100644 index 0000000..637d9a6 --- /dev/null +++ b/app/posts/urls/src_urls.py @@ -0,0 +1,49 @@ +from django.urls import path, re_path + +from ..views import src_views as views + +app_name = "src" + +urlpatterns = [ + path( + r'feed.xml', + views.SrcRSSFeedView(), + name="feed" + ), + path( + r'topic/<str:slug>', + views.TopicListView.as_view(), + name="list_topics" + ), + #path( + # r'books/<str:slug>', + # views.BookDetailView.as_view(), + # name='detail_book' + #), + #path( + # r'books/', + # views.BookListView.as_view(), + # name='list_books' + #), + path( + r'<str:slug>.txt', + views.SrcDetailViewTXT.as_view(), + name="detail-txt" + ), + path( + r'<str:slug>', + views.SrcDetailView.as_view(), + name="detail" + ), + re_path( + r'<int:page>', + views.SrcListView.as_view(), + name="list" + ), + path( + r'', + views.SrcListView.as_view(), + {'page':1}, + name="list" + ), +] |