summaryrefslogtreecommitdiff
path: root/app/jrnl/urls.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2015-12-02 13:03:21 -0500
committerluxagraf <sng@luxagraf.net>2015-12-02 13:03:21 -0500
commit741cea88d882d8ac185121141ef49815835ad8a7 (patch)
treee465898ca5ba46cc61a191f93f9f71a1fdd7a65d /app/jrnl/urls.py
parent988f1149eedf8de5c6b083370c736a82b53b48ac (diff)
updated url schemes to quiet some django 1.10 warnings
Diffstat (limited to 'app/jrnl/urls.py')
-rw-r--r--app/jrnl/urls.py42
1 files changed, 22 insertions, 20 deletions
diff --git a/app/jrnl/urls.py b/app/jrnl/urls.py
index 09c7b7c..c1cdcdc 100644
--- a/app/jrnl/urls.py
+++ b/app/jrnl/urls.py
@@ -3,57 +3,59 @@ from django.views.generic.base import RedirectView
from . import views
+app_name = "jrnl"
+
urlpatterns = [
url(
- regex=r'^feed.xml',
- view=views.JrnlRSSFeedView(),
+ r'^feed.xml',
+ views.JrnlRSSFeedView(),
name="feed"
),
url(
- regex=r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+).txt$',
- view=views.EntryDetailViewTXT.as_view(),
+ r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+).txt$',
+ views.EntryDetailViewTXT.as_view(),
name="detail-txt"
),
url(
- regex=r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+).amp$',
- view=views.EntryDetailViewAMP.as_view(),
+ r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+).amp$',
+ views.EntryDetailViewAMP.as_view(),
name="detail-amp"
),
url(
- regex=r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$',
- view=views.EntryDetailView.as_view(),
+ r'(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[-\w]+)$',
+ views.EntryDetailView.as_view(),
name="detail"
),
url(
- regex=r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$',
- view=views.EntryMonthArchiveView.as_view(month_format='%m'),
+ r'^(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$',
+ views.EntryMonthArchiveView.as_view(month_format='%m'),
name="list_month"
),
url(
- regex=r'(?P<year>\d{4})/$',
- view=views.EntryYearArchiveView.as_view(),
+ r'(?P<year>\d{4})/$',
+ views.EntryYearArchiveView.as_view(),
name="list_year"
),
url(
- regex=r'(?P<slug>[-\w]+)/(?P<page>\d+)/$',
- view=views.EntryCountryList.as_view(),
+ r'(?P<slug>[-\w]+)/(?P<page>\d+)/$',
+ views.EntryCountryList.as_view(),
name="list_country"
),
url(
- regex=r'(?P<page>\d+)/$',
- view=views.EntryList.as_view(),
+ r'(?P<page>\d+)/$',
+ views.EntryList.as_view(),
name="list"
),
# redirect /slug/ to /slug/1/ for live server
url(
- regex=r'(?P<slug>[-\w]+)/$',
- view=RedirectView.as_view(url="/jrnl/%(slug)s/1/", permanent=False),
+ r'(?P<slug>[-\w]+)/$',
+ RedirectView.as_view(url="/jrnl/%(slug)s/1/", permanent=False),
name="live_location_redirect"
),
# redirect / to /1/ for live server
url(
- regex=r'',
- view=RedirectView.as_view(url="/jrnl/1/", permanent=False),
+ r'',
+ RedirectView.as_view(url="/jrnl/1/", permanent=False),
name="live_redirect"
),
]