]> git.p6c8.net - pcdenotes.git/blobdiff - notes/urls.py
Redirect /notes/ to /
[pcdenotes.git] / notes / urls.py
index 503c5b49d6b8cbc4b272787c3fde5a594394ff23..560e8f5a3670b0b99ebbbc8839c52464999fa9f7 100644 (file)
@@ -1,9 +1,10 @@
-from django.urls import path
+from django.urls import path, re_path
 from . import views
 
 app_name = 'notes'
 
 urlpatterns=[
-    path('', views.note_list, name="note_list"),
-    path('notes/<slug:note_slug>', views.note_detail, name="note_detail"),
+    path('', views.note_list, name='note_list'),
+    re_path('^notes/?$', views.note_redirect, name='note_redirect'),
+    path('notes/<slug:note_slug>', views.note_detail, name='note_detail'),
 ]
\ No newline at end of file

patrick-canterino.de