summaryrefslogtreecommitdiff
path: root/app/links
diff options
context:
space:
mode:
Diffstat (limited to 'app/links')
-rw-r--r--app/links/urls.py26
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"
),
]