2 from django.db import models
3 from core.models import PlCoreBase
4 from core.models import Site
5 from core.models import Deployment
6 from core.models import Tag
7 from django.contrib.contenttypes import generic
9 # Create your models here.
11 class Node(PlCoreBase):
12 name = models.CharField(max_length=200, unique=True, help_text="Name of the Node")
13 site = models.ForeignKey(Site, related_name='nodes')
14 deployment = models.ForeignKey(Deployment, related_name='nodes')
15 tags = generic.GenericRelation(Tag)
17 def __unicode__(self): return u'%s' % (self.name)