Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Empty dashboard home view

Marcin Gębalaf6eacc4b4c2d
diff --git a/saleor/dashboard/templates/dashboard/index.html b/saleor/dashboard/templates/dashboard/index.html
index bcbae40697..6fd3d72fc8 100644
--- a/saleor/dashboard/templates/dashboard/index.html
+++ b/saleor/dashboard/templates/dashboard/index.html
@@ -1,12 +1,11 @@
{% extends "dashboard/base.html" %}
-{% block content %}
+{% block title %}Dashboard{% endblock %}
+{% block content %}
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Dashboard</h1>
</div>
</div>
-
-
{% endblock %}
diff --git a/saleor/dashboard/urls.py b/saleor/dashboard/urls.py
index 33f4292c75..987ca72a70 100644
--- a/saleor/dashboard/urls.py
+++ b/saleor/dashboard/urls.py
@@ -8,7 +8,7 @@ from customer.urls import urlpatterns as customer_urls
urlpatterns = patterns('',
- url(r'^$', core_views.index, name='index'),
+ url(r'^$', core_views.IndexView.as_view(), name='index'),
url(r'^orders/', include(order_urls)),
url(r'^products/', include(product_urls)),
url(r'^payments/', include(payments_urls)),
diff --git a/saleor/dashboard/views.py b/saleor/dashboard/views.py
index 4e44f586d1..5f806dacc3 100644
--- a/saleor/dashboard/views.py
+++ b/saleor/dashboard/views.py
@@ -1,12 +1,10 @@
-import json
from django.contrib.auth.decorators import user_passes_test
-from django.http import HttpResponse
-from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator
+from django.views.generic import TemplateView
-def index(request):
- return TemplateResponse(request, 'dashboard/index.html')
+class IndexView(TemplateView):
+ template_name = 'dashboard/index.html'
class StaffMemberOnlyMixin(object):