diff options
Diffstat (limited to 'app/birds/urls.py')
-rw-r--r-- | app/birds/urls.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/birds/urls.py b/app/birds/urls.py index 017ce39..8b1618c 100644 --- a/app/birds/urls.py +++ b/app/birds/urls.py @@ -4,29 +4,29 @@ from . import views urlpatterns = [ url( - regex=r'(?P<user>[\w]+)/(?P<page>\d+)/', - view=views.BirdListUserView.as_view(), + r'(?P<user>[\w]+)/(?P<page>\d+)/', + views.BirdListUserView.as_view(), name='list_by_person' ), url( - regex=r'(?P<page>\d+)/$', - view=views.BirdListView.as_view(), + r'(?P<page>\d+)/$', + views.BirdListView.as_view(), name="list" ), url( - regex=r'^(?P<slug>[-_\w]+)$', - view=views.BirdDetailView.as_view(), + r'^(?P<slug>[-_\w]+)$', + views.BirdDetailView.as_view(), name='detail' ), # redirect /slug/ to /slug/1/ for live server url( - regex=r'(?P<user>[-\w]+)/$', - view=RedirectView.as_view(url="/birds/%(user)s/1/", permanent=False), + r'(?P<user>[-\w]+)/$', + RedirectView.as_view(url="/birds/%(user)s/1/", permanent=False), name="list_person_redirect" ), url( - regex=r'', - view=RedirectView.as_view(url="/birds/1/", permanent=False), + r'', + RedirectView.as_view(url="/birds/1/", permanent=False), name="list_redirect" ), ] |