models in deployment.py appear to have been moved to site.py
diff --git a/planetstack/core/models/__init__.py b/planetstack/core/models/__init__.py
index 358167f..e31da37 100644
--- a/planetstack/core/models/__init__.py
+++ b/planetstack/core/models/__init__.py
@@ -6,7 +6,6 @@
from .service import ServiceAttribute
from .tag import Tag
from .role import Role
-#from .deployment import Deployment
from .site import Site,Deployment, DeploymentRole, DeploymentPrivilege, SiteDeployments
from .dashboard import DashboardView
from .user import User, UserDeployments, UserDashboardView
@@ -20,8 +19,6 @@
from .slice import SlicePrivilege
from .site import SiteRole
from .site import SitePrivilege
-#from .deployment import DeploymentRole
-#from .deployment import DeploymentPrivilege
from .planetstack import PlanetStackRole
from .planetstack import PlanetStackPrivilege
from .slicetag import SliceTag
diff --git a/planetstack/core/models/deployment.py b/planetstack/core/models/deployment.py
deleted file mode 100644
index b97432b..0000000
--- a/planetstack/core/models/deployment.py
+++ /dev/null
@@ -1,54 +0,0 @@
-import os
-from django.db import models
-from core.models import PlCoreBase
-from django.contrib.contenttypes import generic
-
-# Create your models here.
-
-class ManyToManyField_NoSyncdb(models.ManyToManyField):
- def __init__(self, *args, **kwargs):
- super(ManyToManyField_NoSyncdb, self).__init__(*args, **kwargs)
- self.creates_table = False
-
-class Deployment(PlCoreBase):
- name = models.CharField(max_length=200, unique=True, help_text="Name of the Deployment")
-# sites = ManyToManyField_NoSyncdb('Site', through=Site.deployments.through, blank=True)
-
- def __unicode__(self): return u'%s' % (self.name)
-
-
-class DeploymentRole(PlCoreBase):
-
- ROLE_CHOICES = (('admin','Admin'),)
- role = models.CharField(choices=ROLE_CHOICES, unique=True, max_length=30)
-
- def __unicode__(self): return u'%s' % (self.role)
-
-class DeploymentPrivilege(PlCoreBase):
-
- user = models.ForeignKey('User', related_name='deployment_privileges')
- deployment = models.ForeignKey('Deployment', related_name='deployment_privileges')
- role = models.ForeignKey('DeploymentRole')
-
- def __unicode__(self): return u'%s %s %s' % (self.deployment, self.user, self.role)
-
-
- def can_update(self, user):
- if user.is_readonly:
- return False
- if user.is_admin:
- return True
- dprivs = DeploymentPrivilege.objects.filter(user=user)
- for dpriv in dprivs:
- if dpriv.role.role_type == 'admin':
- return True
- return False
-
- @staticmethod
- def select_by_user(user):
- if user.is_admin:
- qs = DeploymentPrivilege.objects.all()
- else:
- dpriv_ids = [dp.id for dp in DeploymentPrivilege.objects.filter(user=user)]
- qs = DeploymentPrivilege.objects.filter(id__in=dpriv_ids)
- return qs