Commit 9f2856ca authored by Dylann Cordel's avatar Dylann Cordel

0.0.3

parent 6fb4284a
# -*- coding: utf-8 -*-
__version__ = '0.0.2'
__version__ = '0.0.3'
default_app_config = 'cms_graphviz.apps.CMSGraphvizConfig'
......@@ -80,7 +80,7 @@ class GraphvizPlugin(CMSPlugin):
if display_type == cls.DISPLAY_TYPE_DOT:
return graph
g = AGraph(graph)
g = AGraph(graph, strict=False, directed=True)
via_files = []
stylesheet = None
......@@ -125,7 +125,7 @@ class GraphvizPlugin(CMSPlugin):
g.node_attr[attr] = value
if attr == 'shape' and value and value != 'ellipse':
# fix bug : it adds shape="" which means ellipse...
g = AGraph(g.string().replace('shape=""', 'shape="%s"' % value))
g = AGraph(g.string().replace('shape=""', 'shape="%s"' % value), strict=False, directed=True)
if 'edge_attr' in style:
for attr, value in style['edge_attr'].items():
......@@ -155,9 +155,9 @@ class GraphvizPlugin(CMSPlugin):
via_files.append(dot_file)
with open(dot_file[1], 'w') as f:
f.write(g_string)
g = AGraph(dot_file[1])
g = AGraph(dot_file[1], strict=False, directed=True)
else:
g = AGraph(g_string)
g = AGraph(g_string, strict=False, directed=True)
if display_type in (cls.DISPLAY_TYPE_PNG, cls.DISPLAY_TYPE_SVG):
output = g.draw(prog='dot', format=display_type)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment