This change renamed a number of misnamed related fields (e.g. site_privileges->siteprivileges), adds them where they are missing, and changes the corresponding accessors.
diff --git a/planetstack/core/models/userdeployments.py b/planetstack/core/models/userdeployments.py
index 6cc2643..d0337ba 100644
--- a/planetstack/core/models/userdeployments.py
+++ b/planetstack/core/models/userdeployments.py
@@ -6,12 +6,12 @@
from core.models import PlCoreBase,Site,User,Deployment
from core.models import Deployment,DeploymentLinkManager,DeploymentLinkDeletionManager
-class UserDeployments(PlCoreBase):
+class UserDeployment(PlCoreBase):
objects = DeploymentLinkManager()
deleted_objects = DeploymentLinkDeletionManager()
- user = models.ForeignKey(User)
- deployment = models.ForeignKey(Deployment)
+ user = models.ForeignKey(User,related_name='userdeployments')
+ deployment = models.ForeignKey(Deployment,related_name='userdeployments')
kuser_id = models.CharField(null=True, blank=True, max_length=200, help_text="Keystone user id")
def __unicode__(self): return u'%s %s' % (self.user, self.deployment.name)