diff options
author | luxagraf <sng@luxagraf.net> | 2015-12-02 13:03:21 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-12-02 13:03:21 -0500 |
commit | 741cea88d882d8ac185121141ef49815835ad8a7 (patch) | |
tree | e465898ca5ba46cc61a191f93f9f71a1fdd7a65d /app/links | |
parent | 988f1149eedf8de5c6b083370c736a82b53b48ac (diff) |
updated url schemes to quiet some django 1.10 warnings
Diffstat (limited to 'app/links')
-rw-r--r-- | app/links/urls.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/app/links/urls.py b/app/links/urls.py index 5fdaf30..6f9bf22 100644 --- a/app/links/urls.py +++ b/app/links/urls.py @@ -3,35 +3,37 @@ from django.views.generic.base import RedirectView from . import views +app_name = "links" + urlpatterns = [ url( - regex=r'tag/(?P<slug>[-\w]+)/(?P<page>\d+)/$', - view=views.LinkTagListView.as_view(), + r'tag/(?P<slug>[-\w]+)/(?P<page>\d+)/$', + views.LinkTagListView.as_view(), name='list-tag' ), url( - regex=r'(?P<slug>[-\d]+).txt$', - view=views.LinkDetailViewTXT.as_view(), + r'(?P<slug>[-\d]+).txt$', + views.LinkDetailViewTXT.as_view(), name="detail-txt" ), url( - regex=r'(?P<slug>[-\d]+)$', - view=views.LinkDetailView.as_view(), + r'(?P<slug>[-\d]+)$', + views.LinkDetailView.as_view(), name='detail' ), url( - regex=r'(?P<page>\d+)/$', - view=views.LinkListView.as_view(), + r'(?P<page>\d+)/$', + views.LinkListView.as_view(), name='list' ), url( - regex=r'^tag/(?P<slug>[-\w]+)/$', - view=RedirectView.as_view(url="/links/tag/%(slug)s/1/", permanent=False), + r'^tag/(?P<slug>[-\w]+)/$', + RedirectView.as_view(url="/links/tag/%(slug)s/1/", permanent=False), name="live-redirect-tag" ), url( - regex=r'^$', - view=RedirectView.as_view(url="/links/1/", permanent=False), + r'^$', + RedirectView.as_view(url="/links/1/", permanent=False), name="live-redirect" ), ] |