X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fmodels%2Fnode.py;h=07816095fcf94adb74240e0279ca855357f01b10;hb=de5450d5e78802e77c397f0833a6f176c137ef81;hp=fcc3a6afc86a795854b32ef984baea8763ca60a6;hpb=e4d36821aed0d7b980744d4f3d964fc5377966ab;p=plstackapi.git diff --git a/planetstack/core/models/node.py b/planetstack/core/models/node.py index fcc3a6a..0781609 100644 --- a/planetstack/core/models/node.py +++ b/planetstack/core/models/node.py @@ -3,6 +3,8 @@ from django.db import models from core.models import PlCoreBase from core.models import Site from core.models import Deployment +from core.models import Tag +from django.contrib.contenttypes import generic # Create your models here. @@ -10,5 +12,6 @@ class Node(PlCoreBase): name = models.CharField(max_length=200, unique=True, help_text="Name of the Node") site = models.ForeignKey(Site, related_name='nodes') deployment = models.ForeignKey(Deployment, related_name='nodes') + tags = generic.GenericRelation(Tag) def __unicode__(self): return u'%s' % (self.name)