blob: 2ff503e39b83e09690d29f6813cfd46d3c6b3fd7 [file] [log] [blame]
Siobhan Tully4bc09f22013-04-10 21:15:21 -04001import os
2from django.db import models
Siobhan Tully30fd4292013-05-10 08:59:56 -04003from core.models import PlCoreBase
Tony Mack528d4222014-12-05 17:13:08 -05004from core.models import SiteDeployments
Siobhan Tullyde5450d2013-06-21 11:35:33 -04005from core.models import Tag
6from django.contrib.contenttypes import generic
Siobhan Tully4bc09f22013-04-10 21:15:21 -04007
8# Create your models here.
9
10class Node(PlCoreBase):
11 name = models.CharField(max_length=200, unique=True, help_text="Name of the Node")
Tony Mack336e0f92014-11-30 15:53:08 -050012 site_deployment = models.ForeignKey(SiteDeployments, related_name='nodes')
Siobhan Tullyde5450d2013-06-21 11:35:33 -040013 tags = generic.GenericRelation(Tag)
Siobhan Tully4bc09f22013-04-10 21:15:21 -040014
15 def __unicode__(self): return u'%s' % (self.name)
Sapan Bhatia690f8032014-06-13 12:50:36 -040016