Browse Source

Redirect root to documents

Jocelyn Delande 9 years ago
parent
commit
5aa50f0345
1 changed files with 5 additions and 1 deletions
  1. 5 1
      costs/urls.py

+ 5 - 1
costs/urls.py

@@ -1,8 +1,12 @@
 from django.conf.urls import url
+from django.views.generic import RedirectView
+
 from . import views
 
 urlpatterns = [
-    url(r'^$', views.index),
+    url(r'^$',
+        RedirectView.as_view(pattern_name='list-documents'),
+        name='index'),
     url(r'^documents/(?P<pk>\d+)',
         views.detail_document,
         name='detail-document'),