|
3 | 3 | django-postgresql-dag to alternate formats.
|
4 | 4 | """
|
5 | 5 |
|
| 6 | +from itertools import chain |
| 7 | + |
| 8 | +import networkx as nx |
| 9 | +import pandas as pd |
6 | 10 | from django.core.exceptions import FieldDoesNotExist
|
7 | 11 | from django.db.models import Case, When
|
8 | 12 | from django.db.models.fields import DateTimeField, UUIDField
|
9 |
| -from django.db.models.fields.files import ImageField, FileField |
| 13 | +from django.db.models.fields.files import FileField, ImageField |
10 | 14 | from django.db.models.fields.related import ManyToManyField
|
11 | 15 |
|
12 |
| -from .exceptions import GraphModelsCannotBeParsedException, IncorrectUsageException |
13 |
| - |
14 |
| -from itertools import chain |
15 |
| -import networkx as nx |
| 16 | +from .exceptions import (GraphModelsCannotBeParsedException, |
| 17 | + IncorrectUsageException) |
16 | 18 |
|
17 | 19 |
|
18 | 20 | def _ordered_filter(queryset, field_names, values):
|
@@ -203,6 +205,8 @@ def nx_from_queryset(
|
203 | 205 | graph_attributes_dict: A dictionary of attributes to add to the graph itself
|
204 | 206 | node_attribute_fields_list: a list of strings of field names to be added to nodes
|
205 | 207 | edge_attribute_fields_list: a list of strings of field names to be added to edges
|
| 208 | + date_strf: if any provided fields are date-like, how should they be formatted? |
| 209 | + digraph: bool to determine whether to output a directed or undirected graph |
206 | 210 | """
|
207 | 211 | _NodeModel, _EdgeModel, queryset_type = get_queryset_characteristics(queryset)
|
208 | 212 |
|
|
0 commit comments