From: Scott Baker Date: Mon, 22 Dec 2014 23:59:05 +0000 (-0800) Subject: add ManyToMany for (Image, Deployment) X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b62cb06a150b6844f73d8c7133a46df412bb7f00;p=plstackapi.git add ManyToMany for (Image, Deployment) --- diff --git a/planetstack/core/models/image.py b/planetstack/core/models/image.py index 4399c60..0bca22f 100644 --- a/planetstack/core/models/image.py +++ b/planetstack/core/models/image.py @@ -10,6 +10,7 @@ class Image(PlCoreBase): disk_format = models.CharField(max_length=256) container_format = models.CharField(max_length=256) path = models.CharField(max_length=256, null=True, blank=True, help_text="Path to image on local disk") + deployments = models.ManyToManyField('Deployment', through='ImageDeployments', blank=True, help_text="Select which images should be instantiated on this deployment", related_name='images') def __unicode__(self): return u'%s' % (self.name)