X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fmodels%2Ftag.py;h=7c957a196a4b8663c3dd10206f2df5f1c5888670;hb=d351575354b2b220ebfae6d61bb8420d7bba52b8;hp=786b0362a727ad3b99f76cbdfdfa47486e0acafb;hpb=de5450d5e78802e77c397f0833a6f176c137ef81;p=plstackapi.git diff --git a/planetstack/core/models/tag.py b/planetstack/core/models/tag.py index 786b036..7c957a1 100644 --- a/planetstack/core/models/tag.py +++ b/planetstack/core/models/tag.py @@ -1,6 +1,7 @@ import os from django.db import models from core.models import PlCoreBase +from core.models import Project from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic @@ -8,6 +9,8 @@ from django.contrib.contenttypes import generic class Tag(PlCoreBase): + project = models.ForeignKey(Project, related_name='tags', help_text="The Project this Tag is associated with") + name = models.SlugField(help_text="The name of this tag", max_length=128) value = models.CharField(help_text="The value of this tag", max_length=1024)