Skip to main content

Directed Acyclic Graph implementation for Django 1.6+

Project description

Django-dag is a small reusable app which implements a Directed Acyclic Graph.

Usage

Django-dag uses abstract base classes, to use it you must create your own concrete classes that inherit from Django-dag classes.

The dag_test app contains a simple example and a unit test to show you its usage.

Example:

class ConcreteNode(node_factory('ConcreteEdge')):
    """
    Test node, adds just one field
    """
    name = models.CharField(max_length = 32)

class ConcreteEdge(edge_factory(ConcreteNode, concrete = False)):
    """
    Test edge, adds just one field
    """
    name = models.CharField(max_length = 32, blank = True, null = True)

Tests

Unit tests can be run with just django installed at the base directory by running

python manage.py test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-dag-1.4.3.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file django-dag-1.4.3.tar.gz.

File metadata

  • Download URL: django-dag-1.4.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

File hashes

Hashes for django-dag-1.4.3.tar.gz
Algorithm Hash digest
SHA256 e5b003c2352be3ec80f983efde4a848533685a4039d0f5ce2e558553a8109e81
MD5 445167d83d1cc862dd0bc54c33505ff0
BLAKE2b-256 c97426cb5bcc6235f68e9792684e441874cd4d9dbc90bf0db7f78bc932bbeaac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page