From 378baea8c78ccd566b8338e342b260df69de5831 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Fri, 13 Jun 2014 13:37:46 -0400 Subject: [PATCH] Make it possible to go from deployments to sites in the data model. --- planetstack/core/models/site.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planetstack/core/models/site.py b/planetstack/core/models/site.py index eea62fe..fe7fb93 100644 --- a/planetstack/core/models/site.py +++ b/planetstack/core/models/site.py @@ -21,7 +21,7 @@ class Site(PlCoreBase): abbreviated_name = models.CharField(max_length=80) #deployments = models.ManyToManyField('Deployment', blank=True, related_name='sites') - deployments = models.ManyToManyField('Deployment', through='SiteDeployments', blank=True, help_text="Select which sites are allowed to host nodes in this deployment") + deployments = models.ManyToManyField('Deployment', through='SiteDeployments', blank=True, help_text="Select which sites are allowed to host nodes in this deployment", related_name='sites') tags = generic.GenericRelation(Tag) def __unicode__(self): return u'%s' % (self.name) -- 2.47.0