diagram package

Subpackages

Submodules

diagram.admin module

diagram.apps module

class diagram.apps.DiagramConfig(app_name, app_module)

Bases: AppConfig

default_auto_field = 'django.db.models.BigAutoField'
name = 'diagram'

diagram.models module

class diagram.models.Diagram(id, type, name, description, system)

Bases: ImportMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

add_edge_and_relation(relation, id_map=None)

Ensure relation exists in the system. Create an edge in this diagram pointing to relation.

Parameters:
  • relation (dict)

  • id_map (dict | None)

add_node_and_classifier(classifier, id_map=None)

Ensure classifier exists in the system. Create a node in this diagram pointing to classifier. Update id_map[old_id] -> system_id so relations can remap endpoints.

Parameters:
  • classifier (dict)

  • id_map (dict | None)

auto_layout()
delete(*args, **kwargs)
description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

edges

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod import_from_json(data)
name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nodes

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
system

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

system_id
type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class diagram.models.Edge(id, diagram, rel, data)

Bases: ImportMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

data

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

diagram

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

diagram_id
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
rel

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

rel_id
property source
property target
class diagram.models.Node(id, diagram, cls, data)

Bases: ImportMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

cls

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

cls_id
data

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

diagram

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

diagram_id
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>

diagram.tests module

diagram.views module

Module contents