Neo4j graph model with Django
from neo4j.model import django_model as models
class Movie(models.NodeModel):
title = models.Property(indexed=True)
year = models.Property()
href = property(lambda self: ('movie/%s/' % (self.node.id,)))
def __unicode__(self):
return self.title
class Actor(models.NodeModel):
name = models.Property(index=True)
href = property(lambda self: ('/actor/%s/' %
(self.node.id,)))
def __unicode__(self):
return self.name