Added in Project support to be used in concert with Tags on Slice, Site, Sliver and User.
diff --git a/planetstack/core/models/__init__.py b/planetstack/core/models/__init__.py
index 4e6cc83..2280822 100644
--- a/planetstack/core/models/__init__.py
+++ b/planetstack/core/models/__init__.py
@@ -1,5 +1,6 @@
from .plcorebase import PlCoreBase
from .deployment import Deployment
+from .project import Project
from .tag import Tag
from .site import Site
from .site import SitePrivilege
diff --git a/planetstack/core/models/project.py b/planetstack/core/models/project.py
new file mode 100644
index 0000000..9f1a863
--- /dev/null
+++ b/planetstack/core/models/project.py
@@ -0,0 +1,11 @@
+import os
+from django.db import models
+from core.models import PlCoreBase
+
+# Create your models here.
+
+class Project(PlCoreBase):
+ name = models.CharField(max_length=200, unique=True, help_text="Name of Project")
+
+ def __unicode__(self): return u'%s' % (self.name)
+
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 @@
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)