[Feature] Pathway SVG Export (#102)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#102
This commit is contained in:
2025-09-10 18:44:18 +12:00
parent e82fe7e87e
commit 31783306e2
7 changed files with 125 additions and 19 deletions

View File

@ -1452,6 +1452,22 @@ def package_pathway(request, package_uuid, pathway_uuid):
return response
# Pathway d3_json() relies on a lot of related objects (Nodes, Structures, Edges, Reaction, Rules, ...)
# we will again fetch the current pathway identified by this url, but this time together with nearly all
# related objects
current_pathway = Pathway.objects.prefetch_related(
'node_set',
'node_set__out_edges',
'node_set__default_node_label',
'node_set__scenarios',
'edge_set',
'edge_set__start_nodes',
'edge_set__end_nodes',
'edge_set__edge_label',
'edge_set__scenarios'
).get(uuid=pathway_uuid)
context = get_base_context(request)
context['title'] = f'enviPath - {current_package.name} - {current_pathway.name}'