Skip to content

Instantly share code, notes, and snippets.

@mhluongo
Last active December 11, 2015 20:58
Show Gist options
  • Save mhluongo/4658558 to your computer and use it in GitHub Desktop.
Save mhluongo/4658558 to your computer and use it in GitHub Desktop.
import neo4django
from neo4django.db import models
class Preceding(models.NodeModel):
precedes_events = models.Relationship('Event', rel_type=neo4django.Outgoing.PRECEDES_EVENT,
related_name='preceded_by')
precedes_conditions = models.Relationship('Condition', rel_type=neo4django.Outgoing.PRECEDES_CONDITION,
related_name='preceded_by')
class Event(Preceding):
pass
class Actor(Preceding):
pass
class Condition(Preceding):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment