We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ceb41d1 commit b055c9aCopy full SHA for b055c9a
1 file changed
pyflot/devserver.py
@@ -0,0 +1,17 @@
1
+import os
2
+
3
4
+def get_test_page(graph):
5
+ """Renders a test page"""
6
+ templatefile = open(os.path.join(
7
+ os.path.dirname(os.path.abspath(__file__)),
8
+ 'templates',
9
+ 'test_page.html'))
10
+ template = templatefile.read()
11
+ template = template.replace("{{ graph.series_json|safe }}",
12
+ graph.series_json)
13
+ template = template.replace("{{ graph.options_json|safe }}",
14
+ graph.options_json)
15
+ out = open(os.path.join(os.getcwd(), 'testgraph.html'), 'w')
16
+ out.write(template)
17
+ out.close()
0 commit comments