ability to display wholepage dashboard
diff --git a/planetstack/core/dashboard/views/home.py b/planetstack/core/dashboard/views/home.py
index ff6c445..ac52b0b 100644
--- a/planetstack/core/dashboard/views/home.py
+++ b/planetstack/core/dashboard/views/home.py
@@ -14,6 +14,11 @@
{% block content %}
"""
+ head_wholePage_template = r"""{% extends "admin/wholePage.html" %}
+ {% load admin_static %}
+ {% block content %}
+ """
+
tail_template = r"{% endblock %}"
def get(self, request, name="root", *args, **kwargs):
@@ -22,6 +27,8 @@
if name=="root":
return self.multiDashboardView(request, context)
+ elif request.GET.get("wholePage",None):
+ return self.singleFullView(request, name, context)
else:
return self.singleDashboardView(request, name, context)
@@ -104,3 +111,17 @@
context = context,
**response_kwargs)
+ def singleFullView(self, request, name, context):
+ head_template = self.head_wholePage_template
+ tail_template = self.tail_template
+
+ t = template.Template(head_template + self.readTemplate(name) + self.tail_template)
+
+ response_kwargs = {}
+ response_kwargs.setdefault('content_type', self.content_type)
+ return self.response_class(
+ request = request,
+ template = t,
+ context = context,
+ **response_kwargs)
+
diff --git a/planetstack/templates/admin/wholePage.html b/planetstack/templates/admin/wholePage.html
new file mode 100644
index 0000000..1c7423f
--- /dev/null
+++ b/planetstack/templates/admin/wholePage.html
@@ -0,0 +1,4 @@
+<html>
+<head>{% block extrahead %}{% endblock %}</head>
+<body>{% block content %}{% endblock %}</body>
+</html>