return the correct content-type for the graph
This commit is contained in:
@@ -577,8 +577,8 @@ def bg_graph_model():
|
|||||||
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
||||||
|
|
||||||
graph.layout()
|
graph.layout()
|
||||||
#return graph.draw(format='png', prog='dot')
|
|
||||||
if not request.args:
|
if not request.args:
|
||||||
|
response.headers['Content-Type'] = 'image/png'
|
||||||
return graph.draw(format='png', prog='dot')
|
return graph.draw(format='png', prog='dot')
|
||||||
else:
|
else:
|
||||||
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
||||||
|
|||||||
@@ -577,8 +577,8 @@ def bg_graph_model():
|
|||||||
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
||||||
|
|
||||||
graph.layout()
|
graph.layout()
|
||||||
#return graph.draw(format='png', prog='dot')
|
|
||||||
if not request.args:
|
if not request.args:
|
||||||
|
response.headers['Content-Type'] = 'image/png'
|
||||||
return graph.draw(format='png', prog='dot')
|
return graph.draw(format='png', prog='dot')
|
||||||
else:
|
else:
|
||||||
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
||||||
|
|||||||
@@ -577,8 +577,8 @@ def bg_graph_model():
|
|||||||
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
||||||
|
|
||||||
graph.layout()
|
graph.layout()
|
||||||
#return graph.draw(format='png', prog='dot')
|
|
||||||
if not request.args:
|
if not request.args:
|
||||||
|
response.headers['Content-Type'] = 'image/png'
|
||||||
return graph.draw(format='png', prog='dot')
|
return graph.draw(format='png', prog='dot')
|
||||||
else:
|
else:
|
||||||
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user