File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ def nx_from_queryset(
194
194
node_attribute_fields_list = None ,
195
195
edge_attribute_fields_list = None ,
196
196
date_strf = None ,
197
+ digraph = False ,
197
198
):
198
199
"""
199
200
Provided a queryset of nodes or edges, returns a NetworkX graph
@@ -208,7 +209,10 @@ def nx_from_queryset(
208
209
if graph_attributes_dict is None :
209
210
graph_attributes_dict = {}
210
211
211
- graph = nx .Graph (** graph_attributes_dict )
212
+ if not digraph :
213
+ graph = nx .Graph (** graph_attributes_dict )
214
+ else :
215
+ graph = nx .DiGraph (** graph_attributes_dict )
212
216
213
217
if queryset_type == "nodes_queryset" :
214
218
nodes_queryset = queryset
Original file line number Diff line number Diff line change 3
3
import os
4
4
from setuptools import setup
5
5
6
- version = '0.1.5 '
6
+ version = '0.1.6 '
7
7
8
8
classifiers = [
9
9
"Development Status :: 3 - Alpha" ,
You can’t perform that action at this time.
0 commit comments