From 87bdc4e9039482de6db8151a9b5116ac5ccc27b3 Mon Sep 17 00:00:00 2001
From: Marko Samastur <markos@aptivate.org>
Date: Fri, 19 Jun 2015 00:42:39 +0200
Subject: [PATCH] Added skeleton/empty data view

---
 django/website/hid/templates/hid/view.html | 8 ++++++++
 django/website/hid/urls.py                 | 1 +
 django/website/hid/views.py                | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 django/website/hid/templates/hid/view.html

diff --git a/django/website/hid/templates/hid/view.html b/django/website/hid/templates/hid/view.html
new file mode 100644
index 00000000..ac20d756
--- /dev/null
+++ b/django/website/hid/templates/hid/view.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block maincontent %}
+<h2>View data</h2>
+<p>{% trans "This is the view data page." %}</p>
+
+{% endblock maincontent %}
diff --git a/django/website/hid/urls.py b/django/website/hid/urls.py
index eb4ab351..34b0e360 100644
--- a/django/website/hid/urls.py
+++ b/django/website/hid/urls.py
@@ -10,5 +10,6 @@ urlpatterns = patterns('',
     url(r'^sources/upload/$', login_required(UploadSpreadsheetView.as_view()), name='sources-upload'),
     url(r'^sources/(?P<label>\w+)/$', login_required(ListSources.as_view()), name='sources-edit'),
     url(r'^sources/$', login_required(ListSources.as_view()), name='sources'),
+    url(r'^view/$', login_required(TemplateView.as_view(template_name='hid/view.html')), name="data-view"),
     url(r'^$', login_required(TemplateView.as_view(template_name='hid/dashboard.html')), name="dashboard"),
 )
diff --git a/django/website/hid/views.py b/django/website/hid/views.py
index 83aef172..275f5e6b 100644
--- a/django/website/hid/views.py
+++ b/django/website/hid/views.py
@@ -33,7 +33,7 @@ class UploadSpreadsheetView(FormView):
     template_name = 'hid/upload.html'
 
     def get_success_url(self):
-        return reverse("sources")
+        return reverse("data-view")
 
     def form_valid(self, form):
         data = form.cleaned_data
-- 
GitLab